RTKLIB Setup on Rpy2 with Ublox m8n EVK connected over USB

I am trying to get RTKLIB (to be precise RTKRCV the Real-Time Positioning App in the Comand Line) working on a Raspberry Pi2. In a first step I like to achieve a Single Solution with an Ublox m8n EVK which is connected over USB to the Rpy2 with gps only.

My setup is based on the Ubuntu 14.10 / Linaro 15.01 image

Because I need some other packages I added raspbian jessie main package source:

Edit /etc/apt/sources.list and add the line:
deb http://archive.raspbian.org/raspbian jessie main
Update the Apt cache (to find nr of missing key):
$ sudo apt-get update
Add public key
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys <key_nr>
Update apt cache again
$ sudo apt-get update

Then I downloaded the RTKLIB with
git clone https://github.com/tomojitakasu/RTKLIB.git

In the folder app/rtkrcv/gcc I edited the makefile
I just add a CTARGET line for rpy2
CTARGET=-march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard

and compiled with gcc 4.9.2 (Raspbian 4.9.2-10)

Then I copied the binary rtkrcv to a new created folder bin_rpy2 at the same level as the folder app bin brd data doc lib

I started with the config file from emlid

I just edited Line 7 change from “spi” to "serial"
Line 10 from “/dev/spidev0.0” to "/dev/ttyACM1:115200:8:n:1:off"
EDIT: correct is "ttyACM1:115200:8:n:1:off"
Line 39 from “…/data/ubx_spi_raw_5hz.cmd” to “…/data/ubx_m8n_glo_raw_1hz.cmd”

The rest I didn’t touch.

The modified rover-single.conf file is also located in the bin_rpy2 folder.

I now start rtkrcv with:
$…/rtkrcv -s -o ./rover-single.conf

I then get:
“invalid option value pos1-snrmask (./rover-single.conf:46)
no navigation data: rtkrcv.nav
rtk server start error”

Does anybody have some suggestions, ideas how to solve these errors?


Could you please try the mainstream RTKLIB - https://github.com/tomojitakasu/RTKLIB ?
You don’t need emlid\RTKLIB if you’re using the dongle, we made that version for Navio.

@mikhailavkhimenia I compiled the mainstream RTKLIB I just used a .conf file from emlid to start my settup.
I just did a quick diff between emlids rover-single.conf and mainstream RTKLIB:

I will try to find the error sources, I think it is not based on a wrong value for “pos1-snrmask” as the error suggests because both emlid and mainstream RTKLIB .config file use there “0” as value.

Does it start with inpstr1-type=off?

I found the error:
Line 10 is not "/dev/ttyACM1:115200:8:n:1:off"
it must be “ttyACM1:115200:8:n:1:off”

So the correct setup to come from emlids rover-single.conf to a working solution with Ublox m8n connected over usb is:
Line 7 change from “spi” to "serial"
Line 10 from “/dev/spidev0.0” to "ttyACM1:115200:8:n:1:off"
Line 39 from “…/data/ubx_spi_raw_5hz.cmd” to “…/data/ubx_m8n_glo_raw_1hz.cmd”

diff => http://www.diffnow.com/?report=3q0cf

Error about “missing navigation data” is no longer there, error about “invalid option value pos1-snrmask” is still there but it runs also with this error.

I’m having the same error with pos1-snrmask I think maybe the config file is too old? On the manual it says the option should be named


pos1-snrmask_r =on # (0:off,1:on) #SNR Mask
pos1-snrmask_b =on # (0:off,1:on) #SNR Mask
pos1-snrmask_L1 =35,35,35,35,35,35,35,35,35#SNR Mask
pos1-snrmask_L2 =0,0,0,0,0,0,0,0,0 #SNR Mask
pos1-snrmask_L5 =0,0,0,0,0,0,0,0,0 #SNR Mask