Avnav Installation

AvNav Installation

Releases

A description of the releases and download links can be found in the releases document.

To provide a "ready to go" solution there are some images for the raspberry pi you can use. The kind of image we recommend mainly depends on your intended usage.

For the "classical" approach (raspberry pi only used as a server, display on some mobile device) you should use the headless images. For those images a raspberry pi 3B(+) gives a sufficient hardware basis. If you would like to have a monitor directly connected to your pi (and potentially also keyboard and mouse) just have a look at OpenPlotter. For OpenPlotter we recommend a Pi4 with at least 4GB of memory (potentially 2GB will be sufficient but there is not much room for future needs). There are also dedicated AvNav touch images - but currently they are outdated.

Image without attached display (Headless)

Those images are maintained by BlackSea (many thanks...). A description is available on his page.
The images can be downloaded from  free-x and installed on a SD card as described at http://www.raspberrypi.org/downloads (raw images).
The images come with

They are preconfigured to route NMEA0183 traffic from all interfaces to AvNav and from there to SignalK. AvNav will additionally fetch all data from SignalK and is able to display it.
NMEA2000 data will flow via Canboat to SignalK and in parallel to AvNav.
For details refer to CanBoatAndSignalK.

Image Preparation

new as of 20210322

Before inserting the SD card into your Raspberry (after you wrote the image to it) you should adapt a couple of settings (especially passwords).
The images hold a configuration file "avnav.conf" in the first partition of the SD card (boot partition). This file can be adapted using a text editor.

More easily you can use a simple GUI that is provided here.

The meaning of the fields:

name default description
Wifi SSID avnav The name of the Wifi network created by the raspberry. The images are prepared to create multiple networks - if you e.g. decide to add an additional Wifi stick, the software will append a 1 digit number to this name
Wifi Password avnav-secret The password for the Wifi network. In any case you should change this. Just keep in mind that everybody that can connect to this Wifi network is able to influence your navigation.
User pi password raspberry This is the password for the user pi whenever you connect e.g. with ssh or by attaching a monitor and keyboard. Also change this one!
Configure MCS false When activated the image will set up the necessary software to interact with the Marine Control Server from GeDad. This will cause an additional reboot of the Pi when it starts up for the first time.

After filling the values you need to click the download button and store the file avnav.conf into the first partition of your SD card (overwriting the existing example there!). To be able to do this, your SD card must be visible on your computer (on Windows you will only see the first partition). Potentially it could be necessary to eject, remove and reinsert the SD card after you have written the image before the card becomes visible.

It would also be a a good idea to additionally backup the downloaded file at a safe place to be able to use it again whenever you need to create a new SD card.

You can now insert the SD card into your raspberry and power it on. The first boot will take some time as it is rebooting once to enlarge the file system on your card. If you selected the MCS it will reboot twice.

Now you will be able to connect to your pi.

Connecting to your Raspberry Pi

Basically you can connect to the Wifi network established by the raspberry (you have just defined name and password for it) - or you can use an ethernet cable.
To connect to AvNav you need to find the address of the raspberry.
The most simple approach is to use MDNS (also named Bonjour or Avahi). This is supported on all desktop systems. So you can just type into the address bar of your browser:

http://avnav.local

This should take you to the start page of AvNav. You should also be able to use avnav.local if you want to connect to the raspberry using some SSH terminal software (e.g. putty on Windows).
If you try to connect using an ethernet cable it depends whether you only directly connect your computer with the pi - or if you have a home network were both are connected to. If you directly connect with a network cable you need to check if your computer assigns an IP address on this interface (should start with 169....). This can potentially take some time (also on the pi). So maybe you need to wait for up to 2 Minutes. If you have a home network things should go faster - but you need to know that both the pi and your computer have to be within the same network - otherwise avnav.local will not work.
On images prior to 20210322 you potentially need to add :8080 to the address you type into your browser.

Unfortunately avnav.local will not work on Android. Therefore I recommend using a tool that handles this: BonjourBrowser . On IOS a similar tool is available - although avnav.local will work. You will find your pi with the avnav image with the service name "avnav-server". Typically you will also see a second entry "avnav" - this is SignalK on the raspberry.
If you can see your pi in the BonjourBrowser but failing to connect this could be caused by some strange behavior of Android when connected to the internet by mobile data. In this case you should switch off mobile data on your device.

If you have a system that is just connected to the Wifi network of the pi (with no other internet connection established) it should also be possible to connect using

http://avnav.avnav.de

If this does not work the last resort is always to use the ip address.
For the wifi connection the primary ip would be

http://192.168.20.10

If this fails too you may try: 192.168.30.10, 192.168.40.10, 192.168.50.10.
If you are connected with an ethernet cable you only will be able to determine the IP if you have access to the router/dhcp server of your network. You need to check there for the ip address of the pi.

The password has been set using the config file above. When connecting via ssh login with the user name pi. If your selected password does not work, try again with the default ('raspberry'). Potentially you did not store the avnav.conf correctly.
You can enter a root shell with sudo -i.

Technical Details

The pi will set up one (or more) wifi networks using the internal adapter or additional wifi sticks. These networks will have addresses like 192.168.20.0/24, 192.168.30.0/24, 192.168.40.0/24, 192.168.50.0/24. The pi itself has the address 192.168.x.10.

There is a DHCP server and a DNS server (dnsmasqd).

If the pi is connected to a wired network it tries to obtain an ip via DHCP. It has (NAT) forwarding from it's wifi to the wired network. This way you can easily connect to the internet if you are in the wifi network of the pi.
If you connect additional wifi sticks, more access points will be established.

Wifi Client Connection

A wifi stick like in the picture (on newer Pi4 use the blue socket close to the PCB) will allow you to connect to another wifi network - i.e. you can use this to connect to a network in a marina or your LTE router network. The internal name will be wlan-av1. You can configure the access to other wifi networks via the app.

Port 80 is forwarded to the standard listener port of AvNav (8080).

If you are connected to the pi via ssh you can check the status/start/stop with

sudo systemctl status avnav sudo systemctl start avnav sudo systemctl stop avnav

For most actions ssh access to the pi is not required. To update you should use the preinstalled Update Plugin . The server configuration can now be accomplished within the AvNav app - at the Server/Status page.

Image with Display (avnav-touch)

If you prefer to directly connect a display to your pi, this image is for you. Holger (pandel) is maintaining an own image line for this set up. Great documentation is available at his AvNav-Touch website. Download is possible from the download page.
You still will be able to connect additional external displays.
Important Hint: Currently (12/2020) those images are outdated. You need to set up the package repository as described in the next chapter and update the packages from there. We are working on an update.

Package Installation

Thanks to Oleg there are ready to go package repositories you can use in your debian based system. This will work on the pi as well as on any other debian (like ubuntu).
Information is available at his github wiki.

To set up the repository on your system, run the following commands (only required if you don't use the headless or the AvNav touch images):

sudo date -s "2020/12/03 14:30"
wget https://www.free-x.de/debian/oss.boating.gpg.key sudo apt-key add oss.boating.gpg.key wget https://www.free-x.de/debian/boating.list sudo cp boating.list /etc/apt/sources.list.d/ sudo apt-get update

The first line (date -s...) is only necessary if you start e.g. with the headless image or another images that lacks time synchronization. Change date and time to your current time.

To install packages on a raspberry you need the run the following command after setting up the package repository:

sudo apt-get install avnav avnav-raspi avnav-update-plugin
The raspberry will start avnav with the user pi.

For a different debian or if you don't want AvNav to reconfigure your operating system you execute:
sudo apt-get install avnav

Afterwards you can start AvNav as any user with
avnav

With
sudo systemctl enable avnav sudo systemctl start avnav
you can enable avnav to start with the user avnav on system reboot.
Alternatively you can download all packages from my download pages:
After downloading you can install them on a raspberry pi with:
sudo dpkg -i avnav_xxxxxxxx_all,deb sudo dpkg -i avnav-raspi_xxxxxxxx_all.deb sudo apt-get install -f
The first commands will usually complain about missing dependencies, the last one should fix these.

You should install the avnav-raspi package only if you agree to the network settings being changed to AvNav's defaults. Otherwise pick the basic avnav package.

On any other linux just install with:

sudo dpkg -i avnav_xxxxxxxx_all.deb sudo apt-get install -f

I would also recommend to install the AvNav Update plugin - either from the package repositories with

sudo apt-get install avnav-update-plugin

or by downloading it directly from GitHub.

If you didn't install the avnav-raspi package you need some additional steps to automatically start up AvNav:

You could start up AvNav as user pi from the command line with avnav.
If you prefer to run it as a system service you need to create the directory:
/usr/lib/systemd/system/avnav.service.d
and copy the file raspberry.conf there.
Afterwards you still need to change line 5 in this file as you do not have the rasperry specific template. Change it to:

ExecStart=/usr/bin/avnav -q -b /home/pi/avnav/data -t /usr/lib/avnav/avnav_template.xml
Afterwards you can enable and start avnav as system service with
sudo systemctl daemon-reload
sudo systemctl enable avnav sudo systemctl start avnv

If you did not create/copy the raspberry.conf file avnav will not run as user pi but as user avnav.

If you wish a lightweight GUI for chart conversion on your desktop you should install the package 'python-wxgtk3.0'. You can start the GUI with

avnav -g

OpenPlotter

For OpenPlotter we have a complete integration for AvNav (thanks to e-sailing). In the repository https://www.free-x.de/deb4op/ (that is already active in OpenPlotter) the necessary packages are already available. So you can install them simply with

sudo apt update sudo apt install openplotter-avnav

Since 2021/03 AvNav is already officially available in OpenPlotter. Sou if you update OpenPlotter you should already have openplotter-avnav being included.

Do not install avnav-raspi_xxx.deb on OpenPlotter as this will interfere with the OpenPlotter network configuration. Within the OpenPlotter AvNav configuration you can change the port for AvNav (default 8080 and 8082 for ocharts) if this conflicts with other applications.

When installing AvNav this way it will receive all NMEA data from SignalK (and will not open up any USB devices on its own). So you can make any interface configuration changes in OpenPlotter or SignalK.


Windows

For Windows there is an installer, however it will not be updated on every release. The current version is here.
I recommend to use the AvNavNetSetup-jjjj-mm-dd-0.exe installer as this one will download the AvNav software directly and is able to update it without a new installer.
The Windows version is focussed on chart conversion but offers the complete functionality otherwise. You can connect further displays.