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.
-
Modify the GRUB menu by changing into the
/etc/defaultdirectory and editing thegrubfile. 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 -
Once editing is done, run
sudo update-grub -
Verify the generic kernel is being used with the
uname -rcommand in a terminal. You should see something similiar too the followingLinux 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 -
Search for any versions of the HWE kernel with the following command
dpkg -l | grep linux-image -
Remove any versions of the HWE kernel you find
-
Search for any versions of the HWE kernel headers with the following command
dpkg -l | grep linux-header -
Remove any versions of the HWE kernel headers you find
Install Dependencies via apt-get
Install dependencies for the LASS software
- SSH Server
sudo apt-get install openssh-server- purpose: to allow incoming ssh connections
- Diff GUI
sudo apt-get install meld- purpose: to get the meld diff GUI
- ZMQ development libraries
sudo apt-get install libzmq3-dev- purpose: install of zmq
- GIT source control
sudo apt-get install git- purpose: install of git source control
- Standard GNU development tools
sudo apt-get install build-essential- purpose: make, gcc, g++ etc.
- CMake build process software
sudo apt-get install cmake- purpose: for cmake builds
- Glib development libraries
sudo apt-get install libglib2.0-dev- purpose: required by LCM framework (instructions below)
- Opencv development libraries
sudo apt-get install libopencv-dev opencv-doc- purpose: Open Computer Vision development support
- Eigen
sudo apt-get install libeigen3-dev libeigen3-doc- purpose: matrix math support
- ARM development tools
sudo apt-get install gcc-arm-none-eabi libnewlib-arm-none-eabi- purpose: build firmware for power can board stack
- Readline lib
sudo apt-get install libreadline-dev- purpose: bash style tab completion for CLI
- MODBUS development libraries
sudo apt-get install libmodbus-dev- purpose: support for MODBUS protocol
Ops Account Configuration
- 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.
- Open the gnome-control-center also called Settings in the Application Menu
- In the Power settings, disable Blank Screen
- In the Wi-Fi settings (if available), disable it
- In the Bluetooth settings (if available), disable it
- If remote desktop access is desired, you will need to do the following:
- Open up the "Passwords and Keys" application.
- Click on the
+and selectPassword keyringand name itremote-access, then leave the passwords blank. It might warn you about a blank password, but that is OK. - Once the
remote-accesskeyring is in the left pane, right-click on it and clickset as default. - Click on the
Loginkeyring and make sure there are no entries for Remote Desktop. If there are delete them from theLoginkeyring. - Reboot the machine
- Once it auto-logs in, open the Settings application
- Go to
System -> Remote Desktopmenu in Settings- Click on the slide button to turn on 'Desktop Sharing'
- Click on the slide button to turn on 'Remote Control'
- Set Username to
ops - In the password field at the bottom, type in a password you want to use to access remotely (e.g. same as login)
- Close the window and close Setting application
- Reboot
- After auto-login, open the "Passwords and Keys" application again.
- Click on the
remote-accesskeyring and verify there is a Remote Desktop credentials entry - Right click on the 'Login' keyring and select
Set as default. - Reboot once more and after auto-login, test that you can remotely access the machine from a different computer.
-
Add the
opsaccount to dialout by editing the /etc/group file and add the ops user to the dialout groupproxy:x:13: kmem:x:15: dialout:x:20:ops fax:x:21: voice:x:22: -
Configure time synchronization by adding the following lines to the
/etc/systemd/timesyncd.conffile:[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.comNote
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.
-
You can control time synchronization using the following commands (for more information see systemd-timesyncd.service man page)
- Display status of timesyncd using:
systemctl status systemd-timesyncd - Stop timesyncd using:
systemctl stop systemd-timesyncd - Start timesyncd using:
systemctl start systemd-timesyncd
- Display status of timesyncd using:
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
- Ensure the necessary packages are present by running
sudo apt install -y wget apt-transport-https gpg - 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 - 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 - Update just in case by running
sudo apt update - Then install using
sudo apt install temurin-8-jdk - Check the install using
java -versionandjavac -version
Install LCM
- Get the source
- Review the build instructions if necessary
-
Make sure required packages are installed
-
Unzip the source in the
Libsfolder - Create a build folder in the
lcm-X.Y.Zsource folder -
Enter the build folder and configure the make files with cmake
cmake .. -
Build and install the code
make clean make sudo make install sudo ldconfig
Install Procman
- Get the source
- Unzip the source in the
Libsfolder - Create a build folder in the
procmanrepo folder -
Enter the build folder and configure the make files with cmake
cmake .. -
Build and install the code
make clean make sudo make install
Install Qt development software
Qt packages used by LASS
- qt6-base-dev
- qt6-base-dev-tools
- qt6-base-doc
- qt6-base-doc-html
- qt6-base-examples
- qt6-serialport-dev
- qt6-multimedia-dev
- qt6-declarative-dev - for QML
- qtcreator - Qt IDE
Installation
-
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 -
Enjoy!
Install CppLinuxSerial for oi-parosci
-
Clone CppLinuxSerial to the
Libsfoldergit clone https://github.com/gbmhunter/CppLinuxSerial.git -
Create a build folder in the
CppLinuxSerialrepo folder -
Enter the build folder and configure the make files with cmake
cmake .. -
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.
-
Make sure only the replacement ICUSB2328I is plugged into the computer and that the serial ports have enumerated as /dev/ttyUSB0 through /dev/ttyUSB7
-
Get the idVendor, idProduct and serial attrs for the replacement ICUSB2328I adapter using the get_icusb2328i_attrs.sh script
-
Edit the
99-icusb2328i.rulesfile to match the replacement ICUSB2328I -
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