Skip to content

Setup For Workstation Loon

These instructions detail the setup process used to configure the Ubuntu Linux used for control of the LASS.

Verify the Generic Kernel is installed and remove any versions of the HWE Kernel

see Ubuntu kernel lifecycle for details

Warning

Do not uninstall the HWE kernel if that is the kernel being used by the computer. Install the Generic kernel and boot into it before attempting to remove the HWE kernel.

  1. Modify the GRUB menu by changing into the /etc/default directory and editing the grub file. Edit the entries to match the lines below. This change will facilitate switching to the HWE kernel if necessary.

    GRUB_CMDLINE_LINUX_DEFAULT=""
    GRUB_TIMEOUT_STYLE=menu
    GRUB_TIMEOUT=3
    
  2. Once editing is done, run sudo update-grub

  3. Verify the generic kernel is being used with the uname -r command in a terminal. You should see something similiar too the following

    Linux loon 6.8.0-51-generic #52-Ubuntu SMP PREEMPT_DYNAMIC Thu Dec  5 13:09:44 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
    
  4. Search for any versions of the HWE kernel with the following command

    dpkg -l | grep linux-image
    
  5. Remove any versions of the HWE kernel you find

  6. Search for any versions of the HWE kernel headers with the following command

    dpkg -l | grep linux-header
    
  7. Remove any versions of the HWE kernel headers you find

Install Dependencies via apt-get

Install dependencies for the LASS software

  1. SSH Server
    1. sudo apt-get install openssh-server
    2. purpose: to allow incoming ssh connections
  2. Diff GUI
    1. sudo apt-get install meld
    2. purpose: to get the meld diff GUI
  3. ZMQ development libraries
    1. sudo apt-get install libzmq3-dev
    2. purpose: install of zmq
  4. GIT source control
    1. sudo apt-get install git
    2. purpose: install of git source control
  5. Standard GNU development tools
    1. sudo apt-get install build-essential
    2. purpose: make, gcc, g++ etc.
  6. CMake build process software
    1. sudo apt-get install cmake
    2. purpose: for cmake builds
  7. Glib development libraries
    1. sudo apt-get install libglib2.0-dev
    2. purpose: required by LCM framework (instructions below)
  8. Opencv development libraries
    1. sudo apt-get install libopencv-dev opencv-doc
    2. purpose: Open Computer Vision development support
  9. Eigen
    1. sudo apt-get install libeigen3-dev libeigen3-doc
    2. purpose: matrix math support
  10. ARM development tools
    1. sudo apt-get install gcc-arm-none-eabi libnewlib-arm-none-eabi
    2. purpose: build firmware for power can board stack
  11. Readline lib
    1. sudo apt-get install libreadline-dev
    2. purpose: bash style tab completion for CLI
  12. MODBUS development libraries
    1. sudo apt-get install libmodbus-dev
    2. purpose: support for MODBUS protocol

Ops Account Configuration

  1. Set the update policy in the "Software and Updates" app Updates Tab to more restrictive manual settings. This will reduce network traffic and stop automatic updates from interrupting LASS deployments.
  2. Open the gnome-control-center also called Settings in the Application Menu
    1. In the Power settings, disable Blank Screen
    2. In the Wi-Fi settings (if available), disable it
    3. In the Bluetooth settings (if available), disable it
  3. If remote desktop access is desired, you will need to do the following:
    1. Open up the "Passwords and Keys" application.
    2. Click on the + and select Password keyring and name it remote-access, then leave the passwords blank. It might warn you about a blank password, but that is OK.
    3. Once the remote-access keyring is in the left pane, right-click on it and click set as default.
    4. Click on the Login keyring and make sure there are no entries for Remote Desktop. If there are delete them from the Login keyring.
    5. Reboot the machine
    6. Once it auto-logs in, open the Settings application
    7. Go to System -> Remote Desktop menu in Settings
      1. Click on the slide button to turn on 'Desktop Sharing'
      2. Click on the slide button to turn on 'Remote Control'
      3. Set Username to ops
      4. In the password field at the bottom, type in a password you want to use to access remotely (e.g. same as login)
      5. Close the window and close Setting application
    8. Reboot
    9. After auto-login, open the "Passwords and Keys" application again.
    10. Click on the remote-access keyring and verify there is a Remote Desktop credentials entry
    11. Right click on the 'Login' keyring and select Set as default.
    12. Reboot once more and after auto-login, test that you can remotely access the machine from a different computer.
  4. Add the ops account to dialout by editing the /etc/group file and add the ops user to the dialout group

    proxy:x:13:
    kmem:x:15:
    dialout:x:20:ops
    fax:x:21:
    voice:x:22:
    
  5. Configure time synchronization by adding the following lines to the /etc/systemd/timesyncd.conf file:

    [Time]
    
    # https://mww.mbari.org/is/howto/network/timesynch
    
    # Shore
    NTP=time-sh1.shore.mbari.org
    
    # Rachel Carson
    #NTP=time-rc1.rc.mbari.org
    
    # David Packard
    #NTP=TBD
    
    FallbackNTP=ntp.ubuntu.com
    

    Note

    Comment out the time servers that don't apply to the deployment platform. For example comment out Rachel Carson and David Packard if your system will be used on Shore.

  6. You can control time synchronization using the following commands (for more information see systemd-timesyncd.service man page)

    1. Display status of timesyncd using: systemctl status systemd-timesyncd
    2. Stop timesyncd using: systemctl stop systemd-timesyncd
    3. Start timesyncd using: systemctl start systemd-timesyncd

Temurin JDK 8

Note

lcm-spy does not work well with openjdk-8-jdk. It hangs and has issues with refreshing the graphics. The Adoptium version of the JDK resolves these issues. These instructions were partially taken from the installation notes found here

  1. Ensure the necessary packages are present by running sudo apt install -y wget apt-transport-https gpg
  2. Download the Eclipse Adoptium GPG key by running wget -qO - https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/adoptium.gpg > /dev/null
  3. Configure Eclipse Adoptium apt repository by running echo "deb https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | sudo tee /etc/apt/sources.list.d/adoptium.list
  4. Update just in case by running sudo apt update
  5. Then install using sudo apt install temurin-8-jdk
  6. Check the install using java -version and javac -version

Install LCM

  1. Get the source
  2. Review the build instructions if necessary
  3. Make sure required packages are installed

    1. cmake
    2. build-essential
    3. libglib2.0-dev
  4. Unzip the source in the Libs folder

  5. Create a build folder in the lcm-X.Y.Z source folder
  6. Enter the build folder and configure the make files with cmake

    cmake ..
    
  7. Build and install the code

    make clean
    make
    sudo make install
    sudo ldconfig
    

Install Procman

  1. Get the source
  2. Unzip the source in the Libs folder
  3. Create a build folder in the procman repo folder
  4. Enter the build folder and configure the make files with cmake

    cmake ..
    
  5. Build and install the code

    make clean
    make
    sudo make install
    

Install Qt development software

Qt packages used by LASS

Installation

  1. Install all the packages

    sudo apt-get install qt6-base-dev
    sudo apt-get install qt6-base-dev-tools
    sudo apt-get install qt6-base-doc
    sudo apt-get install qt6-base-doc-html
    sudo apt-get install qt6-base-examples
    sudo apt-get install qt6-serialport-dev
    sudo apt-get install qt6-multimedia-dev
    sudo apt-get install qt6-declarative-dev
    sudo apt-get install qtcreator
    
  2. Enjoy!

Install CppLinuxSerial for oi-parosci

  1. Clone CppLinuxSerial to the Libs folder

    git clone https://github.com/gbmhunter/CppLinuxSerial.git
    
  2. Create a build folder in the CppLinuxSerial repo folder

  3. Enter the build folder and configure the make files with cmake

    cmake ..
    
  4. Build and install the code

    make clean
    make
    sudo make install
    

Configure the USB serial ports

A rules file 99-icusb2328i.rules located in /etc/udev/rules.d folder is used to consistently map serial port names to physical serial ports located on the StarTech ICUSB2328I USB to serial port adapters. Below is an example of the rules file.

    # Star Tech ICUSB2328I serial box A
    SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="AB0KDIIZ", MODE="0666", SYMLINK+="ttyTCU1"
    SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="AB0KDIJ1", MODE="0666", SYMLINK+="ttyTCU2"
    SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="AB0KDIJ3", MODE="0666", SYMLINK+="ttyTCU3"
    SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="AB0KDIJ5", MODE="0666", SYMLINK+="ttyTCU4"
    SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="AB0KDIJ4", MODE="0666", SYMLINK+="ttyTCU5"
    SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="AB0KDIJ2", MODE="0666", SYMLINK+="ttyTCU6"
    SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="AB0KDIJ0", MODE="0666", SYMLINK+="ttyTCU7"
    SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="AB0KDIIY", MODE="0666", SYMLINK+="ttyTCU8"

    # Star Tech ICUSB2328I serial box B
    SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="AB0MBOGP", MODE="0666", SYMLINK+="ttyPIC1"
    SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="AB0MBOGS", MODE="0666", SYMLINK+="ttyPIC2"
    SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="AB0MBOGN", MODE="0666", SYMLINK+="ttyPIC3"
    SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="AB0MBOGQ", MODE="0666", SYMLINK+="ttyPIC4"
    SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="AB0MBOGO", MODE="0666", SYMLINK+="ttyPIC5"
    SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="AB0MBOGL", MODE="0666", SYMLINK+="ttyPIC6"
    SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="AB0MBOGM", MODE="0666", SYMLINK+="ttyPIC7"
    SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="AB0MBOGR", MODE="0666", SYMLINK+="ttyPIC8"

If one of the StarTech adapters needs to be replaced with a spare, the rules file must be updated with the vendor id, product id and serial numbers for that adapter. Below is the procedure used to update the rules file.

  1. Make sure only the replacement ICUSB2328I is plugged into the computer and that the serial ports have enumerated as /dev/ttyUSB0 through /dev/ttyUSB7

  2. Get the idVendor, idProduct and serial attrs for the replacement ICUSB2328I adapter using the get_icusb2328i_attrs.sh script

  3. Edit the 99-icusb2328i.rules file to match the replacement ICUSB2328I

  4. Test the new rules file to verify that the serial ports are enumerating correctly for the replacement ICUSB2328I

Note

this procedure is based on a tutorial found here