Skip to content

Computer Setup For Navproc, Logging, and LCM Bridge

These instructions detail out how to install the MBARI Navproc, Logr and LCM Bridge software on a new Intel NUC machine.

Install Ubuntu 22.04

  1. Create a bootable USB installer for Ubuntu 22.04.
  2. Insert into the NUC and power on.
  3. Press the 'magic' keys to get you into the BIOS for your particular NUC. For my computer, it was holding the F2 key.
  4. In the BIOS, enable UEFI boot method and disable Legacy.
  5. Make sure the USB device is first in the boot order and Save and Exit BIOS configuration.
  6. The machine should reboot and then come to the GNU GRUB Menu
  7. Select 'Try or Install Ubuntu'
  8. The machine should reboot again and, after a while, come up and bring up the Install GUI
  9. Click on Install Ubuntu
  10. Leave the default selections for Normal installation and Download updates while installing Ubuntu, but also check the box for Install third-party software for graphics and WiFi... and click Continue. After you check this, with secure boot enabled, you will need to set a password. I used the same as the password for the ops account.
  11. Select Erase disk and install Ubuntu and click Install Now.
  12. If you are prompted with a warning about losing contents on the disk, just click Continue.
  13. Select your timezone
  14. For the account, enter ops as the username (get password from engineering) and assign the computer the correct network name. Click on Log in automatically and then click Continue. The install should then commence and once it's complete, it will ask you to reboot (remove the USB when rebooting).
  15. It will log you in automatically and then prompt you for:
    1. It might ask to set up Cloud account: Just skip
    2. Click Next if you are prompted about LivePatch
    3. Help Improve Ubuntu: You can choose No, don't send system info
    4. Just click Next on privacy settings without enabling it.
  16. Once the initial setup is complete, it likely will prompt you to install updates (or run Software Updater) and install all updates to get system current (keep running updates until it says you are up-to-date).

Warning

THIS SECTION NEEDS TO BE TESTED AND UPDATED!!! - kgomes March 14, 2025

If you are going to install this on Ubuntu 24, note that you need to downgrade the default installation to the GA version of the kernel to prevent future updates from breaking the serial (RealPort) drivers.

  1. Next, we need to downgrade the kernel from 6 to the GA version of 6.8 for driver compatibility. Do this by opening a terminal and running

    sudo apt install linux-generic
    
  2. Then, remove the Hardware Enablement HWE kernel package by running the following in terminal:

    sudo apt-get purge linux-image-generic-hwe-24.04
    sudo apt-get purge linux-headers-generic-hwe-24.04
    
  3. Next, modify the GRUB menu by changing into the /etc/default directory and editing the grub file. Change the entries to match the lines below

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

  5. Reboot the machine and when the menu shows, down-arrow to the Advanced Options for Ubuntu and hit Enter.
  6. Down-arrow to the entry Ubuntu, with Linux 6.8.xxxxx-generic and hit Enter.
  7. Once boot up is complete, you need to find which HWE kernels to remove. Open a terminal and run:

    dpkg -l | grep linux-image
    
  8. Note any lines that have the name linux-image-6.xxxxx in it. Then open a terminal and remove the HWE (6) kernel by running

    sudo apt-get purge [linux-image-6.xxxxx]
    
  9. An example of this might be:

    sudo apt-get purge linux-image-6.xxxxx-generic
    sudo apt-get purge linux-image-6.xxxxx-generic
    
  10. Similarly, we need to remove kernel header which can be found by running

    dpkg -l | grep linux-header
    
  11. Again, look for names that start with linux-headers-6.xxxxx and remove them using

    sudo apt-get purge [linux-headers-6.xxxxx]
    
  12. As an example, it might look like

    sudo apt-get purge linux-headers-6.5.0-18-generic
    sudo apt-get purge linux-headers-6.5.0-27-generic
    
  13. Next, clean up any orphaned kernel stuff by running

    sudo apt-get autoremove
    
  14. Reboot the machine to verify all went well by running uname -r in a terminal to verify you are on kernel 6.8.

Install Dependencies via apt-get

Next, we need to install all the dependencies. Let's start with the packages we can install via apt-get.

  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. CVS source control
    1. sudo apt-get install cvs
    2. purpose: to get CVS source control
  4. ZMQ development libraries
    1. sudo apt-get install libzmq3-dev
    2. purpose: install of zmq
  5. Hiredis Development Libraries
    1. sudo apt-get install libhiredis-dev
    2. Purpose
  6. GIT source control
    1. sudo apt-get install git
    2. purpose: install of git source control
  7. MODBUS development libraries
    1. sudo apt-get install libmodbus-dev
    2. purpose: install of modbus library
  8. Standard GNU development tools
    1. sudo apt-get install build-essential
    2. purpose: make, gcc, g++ etc.
  9. CMake build process software
    1. sudo apt-get install cmake
    2. purpose: for cmake builds
  10. Windowing Shell
    1. sudo apt-get install wish
    2. purpose: support for Digi RealPort GUI dgrp_gui
  11. Lib ncurses
    1. sudo apt-get install libncurses5-dev libncursesw5-dev
    2. purpose: support for Digi RealPort driver build
  12. NcFTP file transfer
    1. sudo apt-get install ncftp
    2. purpose: for the nightly xfer of data to shore
  13. Net Tools network diagnostic utils
    1. sudo apt-get install net-tools
    2. purpose: to check port conflicts between applications
  14. Curl utility for downloading files from the internet
    1. sudo apt-get install curl
    2. purpose: to get any supporting files for the installation process
  15. Glib developer libraries
    1. sudo apt-get install libglib2.0-dev
    2. purpose: in order to build the LCM framework (instructions below)
  16. SSL developer libraries
    1. sudo apt-get install libssl-dev
    2. purpose: needed to build the real port drivers
  17. Python 3 virtual environments
    1. sudo apt-get install python3.10-venv
    2. purpose: needed to create virtual environment for bcserver python process
  18. MQTT Client libraries
    1. sudo apt-get install libpaho-mqtt-dev libpaho-mqtt1.3 libpaho-mqttpp-dev libpaho-mqttpp3-1
    2. Purpose: need for MQTT portion of LCM bridge

For simplicity sake, you can copy and run the following command that is a one-line version of all the steps above.

sudo apt-get install cvs libzmq3-dev git libmodbus-dev build-essential cmake wish libncurses5-dev libncursesw5-dev ncftp net-tools curl libglib2.0-dev libssl-dev python3.10-venv libpaho-mqtt-dev libpaho-mqtt1.3 libpaho-mqttpp-dev libpaho-mqttpp3-1

Ops Account Configuration

  1. Set the update policy and if deploying on a sea going vessel open the "Software and Updates" app and configure the Updates Tab to more restrictive manual settings. This will reduce network traffic and stop automatic updates from interrupting logging.
  2. Next, open the gnome-control-center also called Settings in the Application Menu
    1. In the Power 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 not entries for remote desktop or VNC. 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 Sharing menu in Settings
    8. Click on the slide button to turn on Sharing
    9. Click on `Remote Desktop' row
      1. Click on the slide button next to 'Remote Desktop' to enable it
      2. Check the box next to 'Enable Legacy VNC Protocol'
      3. Click on the three vertical dots to the right of the 'Enable Legacy VNC Protocol' and select the 'Password' radio button
      4. Click on the slide button and makes sure 'Remote Control' is enabled also.
      5. In the password field at the bottom, type in a password you want to use to access remotely (we use same as login)
      6. Close the window and close Setting application
    10. Reboot
    11. After auto-login, open the "Passwords and keys" application again.
    12. Click on the remote-access keyring and verify there are two entries for Remote Desktop and VNC
    13. Right click on the 'Login' keyring and select Set as default.
    14. Reboot once more and after auto-login, test that you can remotely access the machine from a different computer.
  4. Next, 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. Add the following environment setting to the ops ~/.profile file

    # User specific environment and startup programs
    export NAVPROC_HOME=/home/ops/CoreNav/navproc-<ship>
    
    # add navproc bin path for either rc or wf
    PATH="$PATH:$NAVPROC_HOME/apps:$NAVPROC_HOME/scripts"
    
    # The LCM URL is only set in the navproc-process *.ini
    # file and used by all processes and loggers at startup
    export LCM_DEFAULT_URL=NOT_SET
    
    alias gh='history | grep'
    alias ge='env | grep'
    alias gp='ps ax | grep'
    
    alias goback='cd $OLDPWD'
    

    Note

    Replace above with the path to the scripts for the ship (e.g. rc, wf).

    Note

    It's necessary in Terminal to check, "Run command as login shell" Preferences -> Profiles -> [profile name] -> Command

  6. Next 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.

  7. 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

Check Out Code

Before continuing on, we need to checkout the code for this project as the next steps has some dependencies that are in the repositories. To check everything out, run the following:

    cd
    mkdir CoreNav
    cd CoreNav
    git clone --recurse-submodules https://bitbucket.org/mbari/navproc-[platform].git
    git clone https://bitbucket.org/mbari/navproc-misc.git

Note

You need to substitute the platform name [sim|dp|rc] in the first git checkout depending on which platform you are building for.

Warning

At the time of this writing, we were working in the 'develop' branches for navproc-common, navproc-process, and navproc-logr. So, to switch to those, you need to cd ~/CoreNav/navproc-[platform]/src/navproc-[common|process|logr] and then switch using git switch develop.

Install Procman

These next steps will install the Procman utilities that are utilized to control and inspect the various processes that run under the navproc, logr, bridge stack.

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 instllation 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

    Note

    You can install other versions using sudo apt install termurin-<version>-jdk and then use update-alternatives to switch between them. This is NOT necessary for this work.

Install python2 and set as default

Ubuntu 22 removed Python 2 and it is necessary for the Procman installation so it needs to be configured. This can be done by doing the following steps:

    sudo apt-get install python2-dev
    sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 1
    sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 2
    sudo update-alternatives --config python

After running the last command, you will be prompted to choose the default Python and select the number associated with Python 2 (should be option 1). You can verify the version by running python --version and you should see 2.7.18.

Install LCM

Next, we need to install LCM which is a key component for this software system. This is done by checking out the code and building it on this machine. To do this run:

    cd
    mkdir Libs
    cd Libs
    git clone --branch v1.5.0 https://github.com/lcm-proj/lcm.git
    cd lcm
    mkdir build
    cd build
    cmake ..
    make
    sudo make install
    sudo ldconfig

Fix Python2.7 lib install

In order for things to work, we need to inform Python 2.7 about the local LCM installation (which ends up under Python 3 by default). This can be done by running:

    sudo cp -r /usr/local/lib/python3.10/dist-packages/lcm /usr/local/lib/python2.7/dist-packages/

Install python-gtk2

Now, for libbot2 to work, we need to install the repackaged python-gtk2_2.24.0-5.1ubuntu2_amd64.deb debian package. First, install the available packages by running

    sudo apt-get install libffi7
    sudo apt-get install libgdk-pixbuf2.0-0

And then install python-gtk2 dependencies that are deprecated by changing into the navproc-misc repository you checked out earlier and installing them.

    cd ~/CoreNav/navproc-misc/packages/python-gtk2-ubu-22
    sudo dpkg -i python-cairo_1.16.2-2ubuntu2_amd64.deb
    sudo dpkg -i python-gobject-2_2.28.6-14ubuntu1_amd64.deb
    sudo dpkg -i python-gtk2_2.24.0-5.1ubu2204_amd64.deb

Install libbot2

Now we are finally ready to install libbot2 using

  1. Change into the Libs directory using cd ~/Libs
  2. Checkout the libbot2 using git clone https://github.com/libbot2/libbot2.git
  3. Change into the libbot2 directory using cd libbot2 and edit the tobuild.txt file and comment out the vis, lcmgl, param and frames line so it looks like what is below

    bot2-core
    #bot2-vis
    bot2-procman
    #bot2-lcmgl
    bot2-lcm-utils
    #bot2-param
    #bot2-frames
    
  4. Build and install to /usr/local by running sudo make BUILD_PREFIX=/usr/local

Note

make uninstall should uninstall /usr/local version

  1. In order to get navproc_spy and bot-spy to work properly, you need to edit the /usr/local/bin/bot-spy file and change the following line:
    for f in $jd/lcmtypes_*.jar $jd/lcmspy_plugins_*.jar; do
    

to

    for f in $jd/*.jar; do

Build and Install CPPZMQ

This is a library that is used by the LCM bridge to send message to a ZeroMQ proxy. To install run the following:

    cd ~/Libs
    git clone https://github.com/zeromq/libzmq.git
    cd libzmq
    mkdir build
    cd build
    cmake ..
    make
    sudo make install
    cd ~/Libs
    git clone https://github.com/zeromq/cppzmq.git
    cd cppzmq
    mkdir build
    cd build
    cmake ..
    make
    sudo make -j4 install

Build and Install Redis++

This is a library that is needed by the LCM bridge to send messages to the API server (which is running Redis). This is built by running the following

    cd ~/Libs
    git clone https://github.com/sewenew/redis-plus-plus.git
    cd redis-plus-plus
    mkdir build
    cd build
    cmake ..
    make
    sudo make install

Build and Install NATS client

This is another library needed by the LCM bridge

    cd ~/Libs
    git clone https://github.com/nats-io/nats.c.git
    cd nats.c
    mkdir build
    cd build
    cmake ..
    make
    sudo make install

Build and Run Navproc, Logr, and LCM Bridge

Now that all the dependencies are ready to go, it's time to build and run the software stack. First change into the code repository by running cd ~/CoreNav/navproc-[platform]. At the top level of the repository, there are four configuration files that tailor the software to your environment.

  1. lcm-bridge-config.json is the configuration file for the software that listens for LCM messages and sends them on to other systems. For more information on this configuration file, see the project README.
  2. logr-config.json is the configuration for the data loggers that can be configured to log data to a location in a custom format.
  3. navproc.ini is the configuration file for the navproc processes (what ports the listen to, etc.)
  4. procman.cfg is the process configuration file to manage the various pieces of software running on this host.

Before starting the software, it needs to be built. In order to do this, you simply run

    make all
    make install

This creates all the executables and scripts and places them in the apps and scripts folder. Earlier you configured your .profile to include those in your path, so you should now have access to all the software need to run the system.

You do have to change one script to make it executable by running

    chmod a+x /home/ops/CoreNav/navproc-[platform]/scripts/annoFtpTransfer.perl

In order for the Java-base spy GUIs to work correctly, you will need to put the Java LCM types into the classpath for the GUI. The easiest way to do this is to run the following commands:

    cd ~/CoreNav/navproc-[platform]/src/lcm_bridge/src/generated/java
    javac **/*.java -classpath /usr/local/share/java/lcm.jar
    jar cf lcmtypes_navproc.jar **/*
    sudo cp lcmtypes_navproc.jar /usr/local/share/java

And lastly, let's create the data directory by running:

    cd /
    sudo mkdir data
    sudo chown ops:ops data
    cd data
    mkdir logs
    cd logs
    mkdir nightly-ftp

For the nightly log file transfers, we need to install some perl modules and set up a cron job. To install the necessary perl module, run

    sudo cpan -i Net::Ping
    sudo cpan -i Net::Ping::External

Accept the defaults for the installation process.

If you want to run the nightly log transfer automatically, load the crontab by running the following in the navproc-[platform] directory

    crontab ./crontab

Installing and Configuring Digi Terminal Server Virtual Ports

In order to route serial streams to Navproc, we use Digi ConnectPort TS16 terminal servers. To connect them to the navproc host, you need to install the Digi drivers and run utilities to create the virtual serial ports on the navproc host. Before you begin, you will need the IP address of the ConnectPort terminal server. For the sake of this documentation, we will use the IP address of the simulator TS16 which is 134.89.10.100. The following steps are all run from a terminal on the navproc host machine (need to be using the Desktop as you will need to use a Java based UI).

  1. Change into the Libs directory using cd ~/Libs
  2. Download the standalone Digi Java application which runs under Linux/Windows using curl --output addpclient.zip ftp://ftp1.digi.com/support/utilities/addpclient.zip
  3. Unzip the file using unzip addpclient.zip which will create the `AddpClient.jar file.
  4. Start the application by running java -jar AddpClient.jar which will open a UI which should find any TS 16's that are on the network addpclient-gui-1
  5. Click on the row for the TS 16 you will be connecting to the navproc machine and then click Configure network settings addpclient-gui-2
  6. Now configure the TS 16 network in the way that is appropriate. For this case, we used a static IP address, but on the boats I believe we will use DHCP and just use the name of the device.
  7. If you made changes to the device, click on Restart Device and wait for the TS 16 to restart.
  8. Once restarted and/or ready, click on the TS 16 in the UI, then click on Open web interface
  9. This will open a web browser and login using the root account (consult engineering/operations for the password)
  10. Click on Network
  11. Click on Advanced Network Settings and assign a hostname for the terminal server and set the DNS server IP addresses (consult with I.S.), then click Apply digi-ts16-web-1
  12. Next, we need to install the RealPort drivers that will connect to the terminal server and mount the 16 serial ports as /dev/tty devices.
  13. In a browser window, go to https://www.digi.com/support/cpts8
  14. Scroll down and click on RealPort Driver
  15. In the dropdown box, select Linux
  16. Click on download below the .tgz version which will download a .tgz file to your computer
  17. Open a terminal window and move the downloaded file to the Libs directory by running

    cd ~/Downloads
    mv 40002086_AB.tgz ~/Libs
    
  18. Then unpack the downloaded file by running

    cd ~/Libs
    tar -xzf 40002086_AB.tgz
    
  19. This will will create a dgrp-1.9 directory.

    Note

    You might have to install/re-install the gcc-12 tool to do the next steps. To do that, run sudo apt-get install --reinstall gcc-12

  20. cd into the dgrp-1.9 and run ./configure

  21. Then run make all
  22. Then run sudo make install
  23. Then run sudo make postinstall
  24. Now, it is time to configure the serial ports. We do this by mapping the ports using sudo dgrp_cfg_node init -v -e never a 134.89.10.100 16
  25. After this, the ports should show up under /dev. Here is the listing for this example

    lrwxrwxrwx   1 root root          12 Oct  9 14:26 ttya00 -> tty_dgrp_a_0
    lrwxrwxrwx   1 root root          12 Oct  9 14:26 ttya01 -> tty_dgrp_a_1
    lrwxrwxrwx   1 root root          12 Oct  9 14:26 ttya02 -> tty_dgrp_a_2
    lrwxrwxrwx   1 root root          12 Oct  9 14:26 ttya03 -> tty_dgrp_a_3
    lrwxrwxrwx   1 root root          12 Oct  9 14:26 ttya04 -> tty_dgrp_a_4
    lrwxrwxrwx   1 root root          12 Oct  9 14:26 ttya05 -> tty_dgrp_a_5
    lrwxrwxrwx   1 root root          12 Oct  9 14:26 ttya06 -> tty_dgrp_a_6
    lrwxrwxrwx   1 root root          12 Oct  9 14:26 ttya07 -> tty_dgrp_a_7
    lrwxrwxrwx   1 root root          12 Oct  9 14:26 ttya08 -> tty_dgrp_a_8
    lrwxrwxrwx   1 root root          12 Oct  9 14:26 ttya09 -> tty_dgrp_a_9
    lrwxrwxrwx   1 root root          13 Oct  9 14:26 ttya10 -> tty_dgrp_a_10
    lrwxrwxrwx   1 root root          13 Oct  9 14:26 ttya11 -> tty_dgrp_a_11
    lrwxrwxrwx   1 root root          13 Oct  9 14:26 ttya12 -> tty_dgrp_a_12
    lrwxrwxrwx   1 root root          13 Oct  9 14:26 ttya13 -> tty_dgrp_a_13
    lrwxrwxrwx   1 root root          13 Oct  9 14:26 ttya14 -> tty_dgrp_a_14
    lrwxrwxrwx   1 root root          13 Oct  9 14:26 ttya15 -> tty_dgrp_a_15
    crw-------   1 root root    235,   0 Oct  9 14:26 tty_dgrp_a_0
    crw-------   1 root root    235,   1 Oct  9 14:26 tty_dgrp_a_1
    crw-------   1 root root    235,  10 Oct  9 14:26 tty_dgrp_a_10
    crw-------   1 root root    235,  11 Oct  9 14:26 tty_dgrp_a_11
    crw-------   1 root root    235,  12 Oct  9 14:26 tty_dgrp_a_12
    crw-------   1 root root    235,  13 Oct  9 14:26 tty_dgrp_a_13
    crw-------   1 root root    235,  14 Oct  9 14:26 tty_dgrp_a_14
    crw-------   1 root root    235,  15 Oct  9 14:26 tty_dgrp_a_15
    crw-------   1 root root    235,   2 Oct  9 14:26 tty_dgrp_a_2
    crw-------   1 root root    235,   3 Oct  9 14:26 tty_dgrp_a_3
    crw-------   1 root root    235,   4 Oct  9 14:26 tty_dgrp_a_4
    crw-------   1 root root    235,   5 Oct  9 14:26 tty_dgrp_a_5
    crw-------   1 root root    235,   6 Oct  9 14:26 tty_dgrp_a_6
    crw-------   1 root root    235,   7 Oct  9 14:26 tty_dgrp_a_7
    crw-------   1 root root    235,   8 Oct  9 14:26 tty_dgrp_a_8
    crw-------   1 root root    235,   9 Oct  9 14:26 tty_dgrp_a_9
    
  26. Once you have some data coming into one of these ports, you can verify the data by using the dinc utility. For example, we have NMEA GPS data coming into port 2 (ttya03) so if you run sudo dinc /dev/ttya03

    ops@navproc-dev-ubuntu-20:/dev$ sudo dinc /dev/ttya03
    
    ------ DINC --- port=/dev/ttya01 ------
    9600 BAUD 8 NONE 1 SWFC=ON  HWFC=OFF
    CAR=ON  DTR=ON  RTS=ON  CTS=ON  DSR=ON
    Type ~? for help.
    ,39*70
    $GPGSV,3,2,12,15,28,186,34,17,88,303,34,20,50,055,33,21,81,314,40*73
    $GPGSV,3,3,12,23,86,261,37,26,42,049,38,28,07,143,10,0$GPGGA,213051.205,3656.080,N,12158.772,W,2,12,1.1,5.2,M,-28.1,M,,*6F
    $GPGSA,A,3,2,3,4,11,15,17,20,21,23,26,28,31,1.1,1.1,1.4*0C
    $GPGSV,3,1,12,02,07,004,35,03,44,059,40,04,54,190,34,11,46,024,39*70
    $GPGSV,3,2,12,15,28,186,34,17,88,303,34,20,50,055,33,21,81,314,40*73
    $GPGSV,3,3,12,23,86,261,37,26,42,049,38,28,07,134,30,31,08,306,37*73
    $GPGLL,3656.080,N,12158.772,W,213051.205,A,A*4B
    $GPVTG,310.3,T,,M,1.9,N,3.5,K,A*02
    $GPRMC,213051.205,A,3656.080,N,12158.772,W,1.9,310.3,091023,,,A*7C
    $GPGGA,213052.207,3656.081,N,12158.773,W,2,12,1.4,4.3,M,-27.2,M,,*67
    $GPGSA,A,3,2,3,4,11,15,17,20,21,23,26,28,31,1.4,1.4,1.4*0C
    $GPGSV,3,1,12,02,07,004,35,03,44,059,40,04,54,190,34,11,46,024,39*70
    $GPGSV,3,2,12,15,28,186,34,17,88,303,34,20,50,055,33,21,81,314,40*73
    $GPGSV,3,3,12,23,86,261,37,26,42,049,38,28,07,134,30,31,08,306,37*73
    $GPGLL,3656.081,N,12158.773,W,213052.207,A,A*4A
    
  27. In order to make sure the ports and permissions survive reboots we need to first edit the /etc/udev/rules.d/10-dgrp.rules so that looks like the following:

    KERNEL=="tty_dgrp*", PROGRAM="/usr/bin/dgrp_udev %k", SYMLINK+="%c", TAG="systemd", GROUP="dialout", MODE="0666", OPTIONS="last_rule"
    #KERNEL=="cu_dgrp*", PROGRAM="/usr/bin/dgrp_udev %k", SYMLINK+="%c", TAG="systemd"
    #KERNEL=="pr_dgrp*", PROGRAM="/usr/bin/dgrp_udev %k", SYMLINK+="%c", TAG="systemd"
    

    Note

    Note that , GROUP="dialout", MODE="0666", OPTIONS="last_rule" was added to the first line and the next two lines were commented out.

  28. Next, we will use the SysVinit style start service model to restart the ports at linux run level 3 during boot. First, change to the correct directory by running cd /etc/rc3.d.

  29. Then create a link to run the daemon at level 3 by running sudo ln -s ../init.d/dgrp_daemon S95dgrp_daemon
  30. Then reboot using sudo shutdown -r now and once the machine comes back up, you should be able to run the same dinc command without sudo privs.
  31. Everything is now installed and ready to go and to start the navproc processes and the loggers, just run ./navproc_start
  32. To monitor the processes with a GUI, run ./navproc_gui
  33. To stop the navproc and logger processes, run ./navproc_kill

Updating Software

The process for deploying updates is to push everything through the Git repositories for the various components. Let's run through an example of deploying updates.

  1. ssh into the Navproc server using ssh ops@[navproc-host].[shore|dp].mbari.org
  2. Change into the source code directory by running cd CoreNav/navproc-[sim|dp]
  3. To check the status of the repo and it's submodules, run ./project_status
  4. If you have any local changes (for example, the redis password in the lcm-bridge-config.json) you will first have to stash those changes and then re-apply them. This can be done by running git stash.
  5. Now you can pull the updates of the top level project using git pull origin
  6. For the submodules, cd into each of the directories in src and run git pull origin
  7. If you stashed changes, cd up to the top level of the project (corenav-[sim|dp]) and re-apply the stash using git stash apply
  8. If you run ./project_status again, everything should look clean.
  9. Now it's time to build and deploy the changes.
  10. cd to the navproc-[sim|dp] directory and run
    1. navproc_kill
    2. make
    3. make install
    4. navproc_start

If Cutover to Spare Happens

On the ships, we have a spare navproc computer running that the pilots can switch over to. If this happens, one thing needs to be done. The software running on coredata-(rcsn|dpkd) uses ssh to copy the log files to shore. When the machine changes, ssh notices and will not allow ssh to occur. You need to ssh into the coredata machine and run

    ssh ops@rcnavproc1.rc.mbari.org

It will reply with a message and you an copy and paste the command to remove the entry from known_hosts that it gives you. Then, re-run the ssh command and it will ask for a password. Enter the password and then ssh should start working again.