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 new Raspberry Pi model B+, which features 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 B+ are the ones starting right beside the power and activity LEDs. You can see how it needs to be mounted on the picture to the right.

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.

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

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