FF
Dr. Franz Fasching
Information — Telecommunications — Technology
Products — Services — Solutions

Welcome!

Dr. Franz Fasching designs, develops, and manages IT and telecommunications solutions. more ...

Recent News

Archives

News Feed

Sitemap

Installation

Prerequisites

Prior to installing the RasPiGNSS make sure you have:

Note: The Raspbian images from 2014-09-09-wheezy-raspbian.img onwards enable pulldowns on the GPIOs and therefore the RasPiGNSS RESET pin (P1 pin 12, GPIO 18) by default. This keeps the NV08C-CSM always in a RESET state, and the board seems “dead”. In order to make the RESET pin work as intended you first have to disable the pulldowns with rpio pulloff 12 prior to using the device. This restores normal behaviour of this pin as was the case with the previous 2014-06-20-wheezy-raspbian.img. All tools mentioned below have been updated to reflect this new firmware change.

Installing the hardware

Note: On the newer Raspberry Pi models (A+, B+, 0, 2, 3), which feature a 40-pin expansion port, the RasPiGNSS needs to be mounted on the first 26 pins, which are electrically compatible to the earlier models A and B. The first 26 pins on the new models are the ones starting right beside the power and activity LEDs. You can see how it needs to be mounted on a model A+ on the picture above.

Installing the software

Note: Most of the tools need access to the RasPi GPIO ports and therefore to the /dev/mem special device, which needs root privileges to be accessed. So either execute those tools as root, use sudo sometool or set the tools setuid bit using chmod ug+s sometool.

Note for Debian “Jessie”: In /boot/cmdline.txt there is no reference to /dev/ttyAMA0, this is called console=serial0,115200 - remove that. Also, with the switch from upstart to the systemd init system, /etc/inittab has vanished. In order to disable a getty process on /dev/ttyAMA0 run the commands sudo systemctl stop serial-getty@ttyAMA0.service and sudo systemctl disable serial-getty@ttyAMA0.service.

Note: On the Pi3 there has been a hardware change: The previous PL011 UART /dev/ttyMA0 is now used by the Bluetooth chip. The pins used by the RasPiGNSS for serial communication with the NV08C-CSM are now mapped to /dev/ttyS0 mini-UART. This mini-UART, however, does not have its own clock generator, but uses the CPU clock. CPU clock scaling due to undervoltage or heat causes baud rate glitches and therefore transmission errors. Therefore I strongly discourage use of the /dev/ttyS0 port for use with the RasPiGNSS. Fortunately there’s a device tree overlay pi3-miniuart-bt that restores the old behaviour and remaps /dev/ttyAMA0 to the GPIO pins used by the RasPiGNSS, and makes the Bluetooth chip use /dev/ttyS0. For this to work, insert dtoverlay=pi3-miniuart-bt into your /boot/config.txt. Look up the details in the Raspberry Pi forums.

Note: On the Pi3 with the latest Raspbian Jessie release (from 2016-05-27) you need to manually re-enable the UART, because it will be switched off by default now. Put enable_uart=1 into /boot/config.txt to re-enable the UART, otherwise /dev/ttyAMA0 will be gone.

Using the device

The NV08C can operate in various operating modes, the most important are NMEA mode (which is the default), and BINR mode (for raw data streaming). Furthermore, each of these modes supports a range of different baud rates on the serial port. To simplify mode switching, use the tool nvsmode, which switches the RasPi /dev/ttyAMA0 serial port and the NV08C from NMEA 115200 8N1 to/from BINR 230400 8O1. The following examples assume that you have all of the above utilities installed at a location included in your shell’s $PATH.

Note: The -v command line option turns on “verbose” mode for all tools below. You may omit that when using the tools in your own scripts. You may obtain detailed help and usage information for each command with the -h or --help command line options.

IMPORTANT! Before using the RasPiGNSS make sure you initialise the GPIOs on the expansion port with the following command:

# nvsctl -v init

Otherwise the RasPiGNSS seems to be “dead”, because due to the new firmware settings the NV08C will be kept in RESET!

NMEA

Obtaining an NMEA stream

First you have to switch the NV08C to NMEA mode, in case it isn’t:

# nvsmode -v nmea

Then you can view the NMEA message stream simply with:

# cat /dev/ttyAMA0

You can send NMEA commands to the NV08C, e.g. set navigation parameters to include SBAS corrections, 60 degrees elevation mask, 10Hz navigation rate, 30dBHz min SNR, and no position filter:

# nmeacmd -v PONAV 1 60 10 30 0

You can find the full NMEA documentation for the NV08C at the NVS website.

BINR

Obtaining a BINR stream

You may obtain the full BINR specification for the NV08C at the NVS website.

First you have to switch the NV08C to BINR mode, in case it isn’t:

# nvsmode -v binr

Then you have to enable the binary message types you like to show up in the BINR stream. The following sequence will set the navigation rate to 2 Hz, enable raw data output for use with RTKLIB, and enable SBAS corrections:

# binrcmd -v NAVRATE 2
# binrcmd -v DIFFCOR 2 1
# binrcmd -v RAWDATA 5

Note: When scripting initialization sequences for the NV08C it may be necessary to wait a certain amount between initialization commands for the NV08C to properly process the command. You may achieve this using e.g. binrcmd WAIT 200 to wait 200 ms.

Using RTKLIB’s rtkrcv with RasPiGNSS

Besides the command line utilities the tar file provided above also contains an example initialisation script init.cmd and rtkrcv.conf configuration file. Use binrcmd -v init.cmd to initialise the RasPiGNSS. init.cmd looks like this:

# reboot without erasing saved parameters
WARMSTART
WAIT 200

# set navgation rate in Hz (1,2,5,10 Hz)
NAVRATE 2
WAIT 200

# differential correction SBAS w/ RTCA troposphere model
DIFFCOR 2 1
WAIT 1000

# raw data output in intervals of dezi-secs (100ms)
# 1 -> 10Hz, 2 -> 5Hz, 5 -> 2Hz, 10 -> 1Hz (inverse
# setting but must be the same or greater than NAVRATE !!)
RAWDATA 5
WAIT 200

# bit information transmitted by satellites
BITINF 1
WAIT 200

# reboot without erasing saved parameters
WARMSTART
WAIT 200

Then you can dump the BINR message stream to a .nvs file for processing with RTKLIB simply with:

# cat /dev/ttyAMA0 >binrfile.nvs

Consult the NVS BINR specification for a detailed description of available message types.

Note: If you intend to use rtkrcv from RTKLIB v2.4.2 make sure you enabled NVS support (see issue #91 at RTKLIB support). We provide a precompiled RTKLIB version 2.4.2p4 commandline binaries for your convenience for the Raspberry Pi including a sample configuration file for rtkrcv in PPP mode.

When initialised properly you may then run rtkrcv -s -p 2950 -o rtkrcv.conf to start the server reading commands from /dev/ttyAMA0, providing a monitor stream on port 2950 and an NMEA output stream on port 2947.

To help setting up an RTK system consisting of base station and rover, additional files are included in the rpgtools package:

You may configure this setup to directly deliver NVS BINR protocol to the rover. This setup needs more bandwidth than a pure RTCM3 one, but delivers more information to the rover (esp. bit information from satellites), that is not present in the RTCM3 protocol. In this case you have to modify both /etc/rtkbase.conf and /etc/rtkrover.conf to use NVS BINR (“nvs”) as the communications protocol.

You have to have a communication channel between base station and rover for those messages. This can be anything from a WiFi link, a Bluetooth connection, or a dedicated RF communications module (e.g. the ISM-band XBee modules).

Flashing the firmware

You can flash new firmware onto the NV08C with:

# nvsfw -v nv08_p2_CSM_WRITE_NNNN.bin

Firmware updates may be obtained from the NVS website. As of this writing, firmware version 2.06 is the most current one, however 2.07 seems to be about to be released soon.

Resetting the device

You can reset the NV08C with the following command:

# nvsctl -v reset

This pulls the RESET line of the NV08C low, waits for 100ms, and sets it high again.

Using the LEDs and switches

The LEDs and switches are connected to regular GPIO pins on the RasPi P1 expansion port, and may be controlled with any suitable GPIO switching tool like the WiringPi library. The rpio utility is included for that purpose that simplifies GPIO handling significantly; however you have to install the Device::BCM2835 Perl module from CPAN first. To switch all LEDs on simultaneously use:

# rpio -v hi out 15 16 18

This switches pins 15, 16, and 18 to output mode and sets them to a high level thus turning on the LEDs. To switch them off again use:

# rpio -v lo 15 16 18

The pins still remain configered as outputs after this command. To configure pins as input, enable pullups, and read their pin status use:

# rpio -v in pullup read 7 11 22

This configures pins 7, 11, and 22 as inputs, enables pullup resistors on them, and reads their pin status, thus querying if any of the tactile switches or the reed contact have been actuated.

Specifications
(0)

Products Menu