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
- Create a bootable USB installer for Ubuntu 22.04.
- Insert into the NUC and power on.
- Press the 'magic' keys to get you into the BIOS for your particular NUC. For my computer, it was holding the F2 key.
- In the BIOS, enable UEFI boot method and disable Legacy.
- Make sure the USB device is first in the boot order and Save and Exit BIOS configuration.
- The machine should reboot and then come to the GNU GRUB Menu
- Select 'Try or Install Ubuntu'
- The machine should reboot again and, after a while, come up and bring up the Install GUI
- Click on
Install Ubuntu - Leave the default selections for
Normal installationandDownload updates while installing Ubuntu, but also check the box forInstall third-party software for graphics and WiFi...and clickContinue. 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. - Select
Erase disk and install Ubuntuand clickInstall Now. - If you are prompted with a warning about losing contents on the disk, just click
Continue. - Select your timezone
- For the account, enter
opsas the username (get password from engineering) and assign the computer the correct network name. Click onLog in automaticallyand then clickContinue. The install should then commence and once it's complete, it will ask you to reboot (remove the USB when rebooting). - It will log you in automatically and then prompt you for:
- It might ask to set up Cloud account: Just skip
- Click
Nextif you are prompted aboutLivePatch - Help Improve Ubuntu: You can choose
No, don't send system info - Just click
Nexton privacy settings without enabling it.
- 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.
-
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 -
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 -
Next, modify the GRUB menu by changing into the
/etc/defaultdirectory and editing thegrubfile. Change the entries to match the lines belowGRUB_CMDLINE_LINUX_DEFAULT="" GRUB_TIMEOUT_STYLE=menu GRUB_TIMEOUT=3 -
Once editing is done, run
sudo update-grub - Reboot the machine and when the menu shows, down-arrow to the
Advanced Options for Ubuntuand hit Enter. - Down-arrow to the entry
Ubuntu, with Linux 6.8.xxxxx-genericand hit Enter. -
Once boot up is complete, you need to find which HWE kernels to remove. Open a terminal and run:
dpkg -l | grep linux-image -
Note any lines that have the name
linux-image-6.xxxxxin it. Then open a terminal and remove the HWE (6) kernel by runningsudo apt-get purge [linux-image-6.xxxxx] -
An example of this might be:
sudo apt-get purge linux-image-6.xxxxx-generic sudo apt-get purge linux-image-6.xxxxx-generic -
Similarly, we need to remove kernel header which can be found by running
dpkg -l | grep linux-header -
Again, look for names that start with
linux-headers-6.xxxxxand remove them usingsudo apt-get purge [linux-headers-6.xxxxx] -
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 -
Next, clean up any orphaned kernel stuff by running
sudo apt-get autoremove -
Reboot the machine to verify all went well by running
uname -rin 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.
- 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
- CVS source control
sudo apt-get install cvs- purpose: to get CVS source control
- ZMQ development libraries
sudo apt-get install libzmq3-dev- purpose: install of zmq
- Hiredis Development Libraries
sudo apt-get install libhiredis-dev- Purpose
- GIT source control
sudo apt-get install git- purpose: install of git source control
- MODBUS development libraries
sudo apt-get install libmodbus-dev- purpose: install of modbus library
- 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
- Windowing Shell
sudo apt-get install wish- purpose: support for Digi RealPort GUI dgrp_gui
- Lib ncurses
sudo apt-get install libncurses5-dev libncursesw5-dev- purpose: support for Digi RealPort driver build
- NcFTP file transfer
sudo apt-get install ncftp- purpose: for the nightly xfer of data to shore
- Net Tools network diagnostic utils
sudo apt-get install net-tools- purpose: to check port conflicts between applications
- Curl utility for downloading files from the internet
sudo apt-get install curl- purpose: to get any supporting files for the installation process
- Glib developer libraries
sudo apt-get install libglib2.0-dev- purpose: in order to build the LCM framework (instructions below)
- SSL developer libraries
sudo apt-get install libssl-dev- purpose: needed to build the real port drivers
- Python 3 virtual environments
sudo apt-get install python3.10-venv- purpose: needed to create virtual environment for bcserver python process
- MQTT Client libraries
sudo apt-get install libpaho-mqtt-dev libpaho-mqtt1.3 libpaho-mqttpp-dev libpaho-mqttpp3-1- 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
- 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.
- Next, open the gnome-control-center also called Settings in the Application Menu
- In the Power 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 not entries for remote desktop or VNC. If there are delete them from theLoginkeyring. - Reboot the machine
- Once it auto-logs in, open the Settings application
- Go to
Sharingmenu in Settings - Click on the slide button to turn on Sharing
- Click on `Remote Desktop' row
- Click on the slide button next to 'Remote Desktop' to enable it
- Check the box next to 'Enable Legacy VNC Protocol'
- Click on the three vertical dots to the right of the 'Enable Legacy VNC Protocol' and select the 'Password' radio button
- Click on the slide button and makes sure 'Remote Control' is enabled also.
- In the password field at the bottom, type in a password you want to use to access remotely (we use 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 are two entries for Remote Desktop and VNC - 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.
-
Next, 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: -
Add the following environment setting to the ops
~/.profilefile# 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
-
Next 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:
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
- 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 -versionNote
You can install other versions using
sudo apt install termurin-<version>-jdkand 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
- Change into the Libs directory using
cd ~/Libs - Checkout the libbot2 using
git clone https://github.com/libbot2/libbot2.git -
Change into the libbot2 directory using
cd libbot2and edit thetobuild.txtfile and comment out the vis, lcmgl, param and frames line so it looks like what is belowbot2-core #bot2-vis bot2-procman #bot2-lcmgl bot2-lcm-utils #bot2-param #bot2-frames -
Build and install to
/usr/localby runningsudo make BUILD_PREFIX=/usr/local
Note
make uninstall should uninstall /usr/local version
- In order to get navproc_spy and bot-spy to work properly, you need to edit the
/usr/local/bin/bot-spyfile 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.
lcm-bridge-config.jsonis 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.logr-config.jsonis the configuration for the data loggers that can be configured to log data to a location in a custom format.navproc.iniis the configuration file for the navproc processes (what ports the listen to, etc.)procman.cfgis 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).
- Change into the Libs directory using
cd ~/Libs - Download the standalone Digi Java application which runs under Linux/Windows using
curl --output addpclient.zip ftp://ftp1.digi.com/support/utilities/addpclient.zip - Unzip the file using
unzip addpclient.zipwhich will create the`AddpClient.jarfile. - Start the application by running
java -jar AddpClient.jarwhich will open a UI which should find any TS 16's that are on the network
- Click on the row for the TS 16 you will be connecting to the navproc machine and then click
Configure network settings
- 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.
- If you made changes to the device, click on
Restart Deviceand wait for the TS 16 to restart. - Once restarted and/or ready, click on the TS 16 in the UI, then click on
Open web interface - This will open a web browser and login using the
rootaccount (consult engineering/operations for the password) - Click on
Network - Click on
Advanced Network Settingsand assign a hostname for the terminal server and set the DNS server IP addresses (consult with I.S.), then clickApply
- Next, we need to install the RealPort drivers that will connect to the terminal server and mount the 16 serial ports as
/dev/ttydevices. - In a browser window, go to https://www.digi.com/support/cpts8
- Scroll down and click on
RealPort Driver - In the dropdown box, select
Linux - Click on
downloadbelow the .tgz version which will download a .tgz file to your computer -
Open a terminal window and move the downloaded file to the Libs directory by running
cd ~/Downloads mv 40002086_AB.tgz ~/Libs -
Then unpack the downloaded file by running
cd ~/Libs tar -xzf 40002086_AB.tgz -
This will will create a
dgrp-1.9directory.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 -
cd into the
dgrp-1.9and run./configure - Then run
make all - Then run
sudo make install - Then run
sudo make postinstall - 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 -
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 -
Once you have some data coming into one of these ports, you can verify the data by using the
dincutility. For example, we have NMEA GPS data coming into port 2 (ttya03) so if you runsudo dinc /dev/ttya03ops@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 -
In order to make sure the ports and permissions survive reboots we need to first edit the
/etc/udev/rules.d/10-dgrp.rulesso 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. -
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. - Then create a link to run the daemon at level 3 by running
sudo ln -s ../init.d/dgrp_daemon S95dgrp_daemon - Then reboot using
sudo shutdown -r nowand once the machine comes back up, you should be able to run the samedinccommand without sudo privs. - Everything is now installed and ready to go and to start the navproc processes and the loggers, just run
./navproc_start - To monitor the processes with a GUI, run
./navproc_gui - 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.
- ssh into the Navproc server using
ssh ops@[navproc-host].[shore|dp].mbari.org - Change into the source code directory by running
cd CoreNav/navproc-[sim|dp] - To check the status of the repo and it's submodules, run
./project_status - 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. - Now you can pull the updates of the top level project using
git pull origin - For the submodules, cd into each of the directories in
srcand rungit pull origin - 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 - If you run
./project_statusagain, everything should look clean. - Now it's time to build and deploy the changes.
- cd to the
navproc-[sim|dp]directory and runnavproc_killmakemake installnavproc_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.