BayLibre ACME legacy software suite

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.

Getting started

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.

BeagleBone Black + ACME

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:

  1. Start-up the board and connect it to the internet. Check that you can ping the outside world.
  2. Go to /root/acme-suite directory and execute 'git pull' in order to get the latest version of the software.
  3. Execute 'make all' in order to build the suite.
  4. Go into the 'scripts' directory and execute '' to complete the installation.
  5. If everything has built and installed properly, reboot the BBB.
    1. ACME SW will be started automatically at boot
  6. When the 2 blue user LEDs D4 & D5 turn ON permanently, the ACME SW is ready and you're ready to go.
  7. You can get the measurements right away by connecting to the board IP address on port 12351 from your web browser ( by default).

Inserting/Removing Probes

ACME SW suite is able to detect probe insertion and removal. However, there are still some temporary limitations to be considered:

  • If a probe is removed while a client is connected (hence showing measurements), the client will break and has to be closed.
  • If a probe is inserted while a client is connected, the client will not be able to display the new measurements. It has to be closed and reopened.
  • The daemon running on the BBB has to be restarted anytime a probe is inserted/removed

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.

Probe Connectors Layout

The following drawing represents which probe number is attributed to each ACME cape connector.

Shunt Resistor Values

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:

  • USB power probes come with a 80mΩ shunt resistor
  • JACK power probes come with a 10mΩ shunt resistor
  • HE10 power probes come with either:
    • 5mΩ shunt resistor (5L0 label on the shunt)
    • 50mΩ shunt resistor (R05F label on the shunt)
    • 500mΩ shunt resistor (R50F label on the shunt)

Unfortunately there is no automatic detection mechanism available. However, there is an interface at 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.

Temperatures Probes

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.

ACME kernel

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 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:

  • cd linux
  • git checkout acme
  • export CROSS_COMPILE=<your cross toolchain prefix> ARCH=arm
  • make acme_defconfig
  • make zImage dtbs modules
  • scp arch/arm/boot/zImage root@
  • scp arch/arm/boot/dts/am335x-boneblack.dtb root@
  • make modules_install INSTALL_MOD_PATH=<your module path>
  • rm <your module path>/lib/modules/<version>/source
  • rm <your module path>/lib/modules/<version>/build
  • scp -r mods/lib/modules/<version>/ root@
  • ssh root@ reboot

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.

Web UI

The Web UI is accessible via web browsers at (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.

Command-line client

In scripts/ directory there's a program called 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.

  # ./ --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:

  # ./ --mode=avg --format=csv --samples=100
  Connection closed

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 ( –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.

Data exchange protocol

For information on the websocket protocol please refer to RFC.

In general:

  • the server exposes two websocket subprotocols: http-only and power-measure-protocol,
  • the http-only protocol is there to serve the static Web UI data (html and javascript),
  • the power-measure-protocol exposes the actual measurement data,
  • upon connection via power-measure-protocol, the server sends a text packet containing the description of all the connected probes encoded in JSON (see below),
  • after that the client is expected to be able to understand subsequent binary frames containing the measurement data,
  • server sends a binary frame every decisecond, each frame contains hundred measurements for each probe, each measurement is 4 bytes long (bytes in network order), the measurements are in the same order as the probes described in the JSON message,
  • at any moment the client can send a power-switch frame containing two bytes the first one indicating the index of the probe and the second containing the desired power state (0 or 1).

JSON probe description

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",
          }, {
              "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.

acme/legacy.txt · Last modified: 2015/04/13 10:56 by bgolaszewski
Recent changes RSS feed Creative Commons License Donate Minima Template by Wikidesign Driven by DokuWiki