The AMIGOS stations have no package management, therefore submodules are used to install dependencies for the AMIGOS operating software. These are checked out under the ./ext
subdirectory and copied to the station on deployment.
-
Initialize submodules (run in repository root directory)
$ git submodule init && git submodule update
Operations are performed from a unix-like system with typical tasks defined in the Makefile
. An ethernet cable and a serial DB-9-to-USB adapter cable are required to interface with the AMIGOS.
The following utilities are assumed to be available locally:
- make
- picocom
- ssh/scp
- rsync
Dependencies in the development environment are managed with Conda.
-
Create the environment (run in repository root directory)
$ conda env create -f environment.yml
This will create a 'amigos' environment with the correct version of python and dependencies for the project.
-
Activate the environment
$ conda activate amigos-test-env
-
Install amigos CLI commands (local to source directory)
$ python setup.py develop
Unit tests are run with the command
$ make test
The Makefile
includes commands for common tasks for operation the stations.
This interface enables terminal interaction as well as outputs system logging.
-
Open the white enclosure and connect serial-to-usb cable to JTAG serial port and laptop USB port
-
Run
$ make serial-con
-
Login when prompted
-
Connect your laptop to the AMIGOS white box "Comp" ethernet port
-
Make sure your laptop ethernet connection is configured with the static IP 192.168.0.33
-
From the "amigos3" repository directory, run
$ make ssh-con
-
Login when prompted
To deploy the "Honcho" AMIGOS operating code from your laptop to the AMIGOS station
-
If you haven't already, initialize submodules (requires internet connection)
$ make submodules
-
Connect your laptop to the AMIGOS white box "Comp" ethernet port
-
Make sure your laptop ethernet connection is configured with the static IP 192.168.0.33
-
From the "amigos3" repository directory, run
$ make sync-code
-
Connect your laptop to the AMIGOS white box "Comp" ethernet port
-
Make sure your laptop ethernet connection is configured with the static IP 192.168.0.33
-
From the "amigos3" repository directory, run
$ make sync-system
-
Connect your laptop to the AMIGOS white box "Comp" ethernet port
-
Make sure your laptop ethernet connection is configured with the static IP 192.168.0.33
-
From the "amigos3" repository directory, run
$ make backup
The entire SD card (including "honcho" code and data) will be copied to ./backup/
.
The "honcho" operating software has a CLI interface to facilitate performing operations on the station manually for e.g. testing. For general usage help
$ honcho --help
For usage help of a specific subcommand
$ honcho <sub-command> --help
honcho system --shutdown
-- shutdown systemhoncho system --reboot
-- reboot systemhoncho system --standby 10
-- standby for 10 minuteshoncho gpio --list
-- show current state of GPIO switched elementshoncho gpio --hub-on
-- turn on ethernet hub (necessary for SSH)honcho gpio --all-off
-- turn off all peripheralshoncho schedule --summary
-- see summary of current schedulehoncho onboard --all
-- get status of Triton onboard sensorshoncho solar --run
-- perform solar measurementhoncho imm --repl
-- access IMM with interactive prompthoncho camera --look WEST
-- point camera to "WEST"honcho camera --snapshot
-- take snapshot to "snapshot.jpg"
Several environment variables modify the operating code globally
LOG_LEVEL
- (CRITICAL, ERROR, WARNING, INFO, DEBUG) - level of loggingMODE
- (NORMAL, SAFE, TEST, WINTER, SUMMER) - mode of operation (e.g. schedule)KEEP_AWAKE
- (0, 1) - station will not enter power-saving sleep mode when idleHUB_ALWAYS_ON
- (0, 1) - do not be powered off after e.g. measurement (useful when debugging/using ssh connection)SKIP_MAINTENANCE
- (0, 1) - do not perform maintenance actions (data archival, reset schedule etc...)IGNORE_LOW_VOLTAGE
- (0, 1) - the station will not go into "hibernation" standby when voltage is below threshold
These are set on bootup automatically from the ./bin/set_env.sh
script.