Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Setup

  1. Install Ubuntu 18.04.3 LTS
  2. Setup the two accounts as described below.
  3. Install the RT Patch (s.t. realtime programming becomes possible)
  4. Setup NTP for time synchronisation
  5. Install RTI DDS Setup for network communication
  6. Install Matlab Setup (optional) and the RTI Matlab Support Package
  7. Install the following packages: git, tree, openssh, tmux, cmake, libgtkmm-3.0-dev
  8. (Optional) Install the raspbian toolchain and the Raspberry Pi RTI libraries
  9. Make sure that you set up a guest account with a simple password. Generate a SSH Key and put the public Key in the LCC main computer, so that a log-in without using a password becomes possible
  10. Enable the autostart script as mentioned above. The script is located in the software repository
  11. If desired, set some environment variables, e.g. the RTI location, the location of the Matlab executable etc
  12. Setup the NUC's IP: 192.168.1.2xx, where xx corresponds to the NUC's ID → ID 8 - 208, ID 15 - 215 etc.

Accounts

We use two user accounts on each NUC. Nevertheless, the setup can be used with only one user. The LCC will establish a connection to each NUC using ssh ACCOUNT@IP-ADDRESS.

Account: controller

The "root" account that can be used to install software or updates, change system settings etc. It is password-protected.

Account: guest

The account used for running the HLC scripts / software on the NUCs. For an SSH connection, no password is required as long as the local SSH key is installed on the current system. This connection is e.g. used by the Lab scripts to upload scripts, so make sure to use these scripts on a machine that owns the key. If it is not on your device, simply copy the key from the Lab's main computer: It is located in home/USERNAME/.ssh/id-rsa and should be copied to a similar location on the desired computer.

This account is also password-protected, but - if necessary - the password can be shared to use the account  without the key-based SSH authentication.

Autostart

Enable autostart for the guest user (on which all remote deploy actions are perfomed), using crontab -e  and insert

@reboot ~/autostart/lab_autostart.bash

This makes the HLC regularly send messages that it was turned on and allows the user to determine which NUCs are online. (Make sure that chmod +x was performed on the file before, and that it does not use relative file locations. Also, make sure that the directory exists and put the autostart script from software/hlc/autostart into the same folder. The autostart program (also from software) is downloaded from the apache web server using the autostart script, which runs on the lab's main computer - if the software has been built on it)

Domain ID: 21. Topic name: hlc_startup

In the given directory should be lab_autostart.bash as well as the executable of the autostart program which is called by the bash script

Info

lab_autostart.bash - if it ever gets changed - needs to be uploaded onto each NUC afterwards, to replace the older file.


Info
titleSoftware out of date

If the software on the NUCs is not up-to-date, check in /var/www/html/nuc on the main PC if all (four) packages downloaded by lab_autostart.bash on the NUCs are provided (and if they are up-to-date)


Info
titleUpload not working

If the upload to the NUCs is not working, check that their fingerprint has already been accepted (needs to be done when no connection has been established before → just manually connect via SSH to the NUCs on your PC once before using the LCC to deploy the files remotely)

Repositories

  • cpm library
  • Lab software