After completing hardware and software installation, there are various modes of operation describer below.
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
-vcommand 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
--helpcommand 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 Raspberry Pi firmware settings the NV08C will be kept in a RESET state!
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.
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 200to wait 200 ms.
rtkrcv with RasPiGNSS
Besides the command line utilities the tar file provided above also contains an example initialisation script
rtkrcv.conf configuration file.
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
rtkrcvfrom 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
rtkrcvin 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
rtkbasewith config file
/etc/rtkbase.conf– this sets up an RTK base station as an RTCM3 server, to which the rover connects to.
/etc/rtkrover.conf– a sample rover config file for
rtkrcvusing base station RTCM3 input.
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/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.
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 Push-Buttons
The LEDs and push-buttons are connected to regular GPIO pins on the RasPi P1 expansion port, and may be controlled with any suitable GPIO support library like the
libbcm2835 or 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 pull-up resistors on them, and reads their pin status, thus querying if any of the tactile switches or the reed contact have been actuated.
|⯇ Installing RasPiGNSS Hardware and Software||⯅ Documentation|