commit | 3222ca2822fdb04920c134b5599fd0c0cbcc5171 | [log] [tgz] |
---|---|---|
author | Emil Lundmark <emil@limesaudio.com> | Mon Feb 27 16:36:02 2017 |
committer | chrome-bot <chrome-bot@chromium.org> | Thu Apr 06 10:29:40 2017 |
tree | 3cbcaaaedd95e44be7d1f30ba350f19e95dd29fd | |
parent | 5ce52f1bfade24552319d01d1c507f972223d948 [diff] |
Add daemon subcommand When an Atrus device is attached to a host computer, this daemon should be started. It's responsible for doing upgrades, if needed, and continuously polling for diagnostics. Output is written to the syslog. The current implementation has a limitation when multiple devices are attached. If device A is attached, the daemon should start. When device B is attached, no new deamon should start. However, if A or B is then detached, the daemon will stop, and the remaining device will not have a daemon to communicate with. B will also not receive any updates, since updates are provisioned only when the daemon starts. This shouldn't be a problem since multiple devices aren't a major use case, but it should be fixed in the future. Note that this change also break CLI compatibility for the upgrade subcommand. The --debug option is now accepted globally and not per subcommand, e.g., $ atrusctl upgrade --debug ... should from now be $ atrusctl --debug upgrade ... BUG=b:35860685 TEST=Ran `atrusctl daemon <file>` on a guado. Verified that the process was daemonized and its output written to syslog. Verified that output from other subcommands were printed to stdout/stderr. Change-Id: I31b415612614d8f1eb5590a890c6af5a55d986ee Signed-off-by: Emil Lundmark <emil@limesaudio.com> Reviewed-on: https://chromium-review.googlesource.com/447636 Reviewed-by: Dmitry Torokhov <dtor@chromium.org>
This tool is used to interact with an Atrus device.
The GNU C Library, libusb 1.0 and libudev are required. GNU C is required because the program utilizes argp
.
CMake is used for building the application.
Here is an example of how to build:
$ mkdir build/ $ cd build/ $ cmake .. $ make
You can also install it on your machine by running:
$ make install
Run the following to see the help section of the application.
$ atrusctl --help
Also, make sure you have read and write access to the USB device. This may be done by, e.g., setting appropriate udev rules.
Individual files are tagged with SPDX-License-Identifier to indicate its license instead of including the full license text. See the SPDX License List for more information.