This page contains informations on building, installing and running the legacy software-suite for BayLibre ACME.
NOTE: this software is deprecated and no longer supported. Sigrok is now the only supported and actively developed user interface. Please refer to the ACME manual on using sigrok in conjunction with buildroot.
The easiest way to get started is to download the mmc card image from our webpage and copy it onto the mmc card by running: bzcat <image file> | sudo dd of=/dev/mmcblk<card number>.
Alternatively you can build the software yourself from scratch by following the below tutorials.
This section contains some basic information on getting started with the first ACME public prototype.
You should have received a BeagleBone Black board together with the ACME cape attached. On the BeagleBone Black there's an Emdebian image installed with a specially patched 3.15.10 kernel.
In order to start working with ACME please follow the steps below:
ACME SW suite is able to detect probe insertion and removal. However, there are still some temporary limitations to be considered:
Hence, it is recommended to insert/remove probe(s) with the BBB powered off and then turn the BBB ON when the new probe layout is ready. Probe layout changes will be automatically detected by ACME SW upon startup.
NB: further SW updates shall remove these temporary limitations.
As the shunt resistor value depends on the expected current range to be measured, ACME power probes have been populated with different shunt resistor values:
Unfortunately there is no automatic detection mechanism available. However, there is an interface at 192.168.7.2:12351/setup which allows to read and change shunt values when the board is powered-on.
The change requires a restart to take effect.
Note the shunt configuration will be saved until the probe layout gets changed. In other words: do it only once when adding or removing a probe, no need to redo it every time the BBB is rebooted or the client restarted.
There is one HW limitation with the temperature probes. TI INA226 and TI TMP435 components handle a fixed set of I2C addresses, and unfortunately some are overlapping. Hence, temperature probes shall only be connected to connector [5-8].
Note there is no such limitation with power probes; it can be connected to any of the 8 ports.
ACME software suite has been written with Linux in mind and has not been tested on different systems yet. Besides glibc6 it's linked against the following external libraries: libwebsockets, libconfig, Qt5 and Qwt6 (the last two are required only for the Qt UI).
You can find the exact instructions on how to build provided programs in the README.building file in the project's main directory.
There's a kernel (based on 3.18 mainline) with additional patches applied which is required to run ACME on a beaglebone black. You can pull the repo from http://git.baylibre.com/pub/acme/linux/. The master branch tracks the mainline Linux while the acme branch has ACME patches applied.
In order to build and install the kernel the following commands should be executed:
After reboot the new kernel should be up and running on your BeagleBone Black.
Installing the cross-toolchain on Debian is described in detail here.
The main component of the software suite is the daemon which runs on the same platform on which the probes are installed and talks to the drivers via sysfs. It exports the data via websocket protocol so that it's suitable both for native UIs as well as for web-browsers.
The daemon can also receive data and instruct probes to cut or restore power to they connected devices.
After having built the daemon, the executable (together with libwebsocket and libconfig) should be installed on the measurement board. The whole /pages directory of the project should be copied to the board as well if you want to provide the Web UI.
The default path to the config file is /etc/pwcd/config.cfg. You can override this by passing the -c option to the daemon.
The default path to the web directory (where the contents of /pages are installed) is /var/pwcd/www. You can override this setting by passing the -w option to the daemon. The specified path has to be an absolute path for security reasons.
The daemon can be ordered to daemonize itself when passed the -d option.
No user configuration required for the daemon. It is able to self-configure at startup, except for the shunt resistor value, as described in this section.
The Web UI is accessible via web browsers at 192.168.7.2:12351 (by default on port 12351, but this can be overriden by -p option in the daemon). It's a simple page, which connects to the daemon via a websocket and starts to draw the plots as soon as it starts receiving the data from the server.
Each chart can be hidden and each separate plot curve can be disabled. Power-switch buttons are displayed for these probes which are equipped with one.
In scripts/ directory there's a program called acme_cli.py. It serves as a command-line utility capable of continuous and time-limited sampling and averaging.
It connects to the beaglebone just like the web UI - via websocket. Executing the below command will give you a detailed listing of average values from 10 seconds of measurements.
# ./acme_cli.py --mode=avg --format=detailed --samples=100 Connection closed --------------------------------------------------- Probe_1 - power: channel 1: Current = 0.239 A Voltage = 4.700 V Power = 1.125 W Probe_2 - temperature: channel 5: Outer temperature = 30.188 C Inner temperature = 41.125 C ---------------------------------------------------
You can change the output format to comma-separated-values for easier parsing:
# ./acme_cli.py --mode=avg --format=csv --samples=100 Connection closed 0.239,4.700,1.125,30.188,41.063
The values are written in the exact same order the measurements were registered - so in this case it's current,voltage,power,outertemp,innertemp.
Note that the 'Connection closed' string is written to stderr, so it's not gonna end up in redirected stdout output.
For other modes and options, please refer to the help text (acme_cli.py –help).
Building the Qt UI is described in detail in README.building.
Upon starting the program displays an empty chart and some text fields allowing to connect to the server at given address and port. Clicking the 'connect' button causes the program to connect to the server via websocket procotol. From this point it works exactly like the browser UI except that all the plots are displayed in a single chart.
Each probe can be hidden and restored with the checkboxes below and clicking separate measurements on the right can hide single plots as well. Power buttons are available for probes equipped with one.
There's a slider in the lower left corner of the UI which allows to dynamically change the width of the plot lines. It's useful when the plot lines are not distinct enough.
For information on the websocket protocol please refer to RFC.
In general:
This is an example JSON message sent in the handshake:
{ "max_sps": 100, "probes": [ { "name": "probe_0_0", "power_switch": "1", "measurements": [ { "name": "Power", "unit": "A" }, { "name": "Voltage", "unit": "V" }, { "name": "Current", "unit": "W" }] }, { "name": "probe_0_1", "measurements": [ { "name": "Temperature 1", "unit":"C" }, { "name": "Temperature 2", "unit": "C" }] }] }
The main difference from the config file structure is that we don't split the probes among capes. This information is irrelevant for the client.
NOTE: the server only supports a single client connection at a time.