Setup
- Install Ubuntu 18.04.3 LTS
- Setup the two accounts as described below.
- Install the RT Patch (s.t. realtime programming becomes possible)
- Setup NTP for time synchronisation
- Install RTI DDS Setup for network communication
- Install Matlab Setup (optional) and the RTI Matlab Support Package
- Install the following packages: git, tree, openssh, tmux, cmake, libgtkmm-3.0-dev
- (Optional) Install the raspbian toolchain and the Raspberry Pi RTI libraries
- 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
- Enable the autostart script as mentioned above. The script is located in the software repository
- If desired, set some environment variables, e.g. the RTI location, the location of the Matlab executable etc
- 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
lab_autostart.bash - if it ever gets changed - needs to be uploaded onto each NUC afterwards, to replace the older file.
Software 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)
Upload 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