tyler123durden / rtklib

RTKLIB modifications for embedded systems
13 stars 23 forks source link

" stream server start error" when reading from serial device #1

Closed wolfgangr closed 11 years ago

wolfgangr commented 11 years ago

Trying to run rtklib on raspberry pi, debian wheezy, build on target gcc (Debian 4.6.3-12+rpi1) 4.6.3

ublox device, NL 507 ETTL using Timo Juhani Lindfors python tools to access raw data,a s found here http://iki.fi/lindi/git/ubx.git/

My next goal is to read raw data from the device and stream it to my internet based ntripcaster. Applying the syntax from str2str -h, I try:

pi@raspberrypi ~/test/ublox/rtk $ str2str -in serial:///dev/ttyAMA0#ubx -out test06.rtcm3#rtcm3
stream server start
stream server start error

However, when I try to work via an intermediary file, like cat /dev/ttyAMA0 > test04.ubx ....^C ....

and read this file into str2str, it works, both in short (filename only) and in full path /// syntax:

pi@raspberrypi ~/test/ublox/rtk $ str2str -in  test04.ubx#ubx -out test04a.rtcm3#rtcm3
stream server start
2013/02/02 11:02:37 [CC---]          0 B       0 bps 1004,1019
2013/02/02 11:02:53 [CC---]    3768320 B 1570296 bps 1004,1019
Segmentation fault

pi@raspberrypi ~/test/ublox/rtk $ str2str -in  file:///home/pi/test/ublox/rtk/test04.ubx#ubx -out test04.rtcm3#rtcm3
stream server start
2013/02/02 11:01:23 [CC---]          0 B       0 bps 1004,1019
2013/02/02 11:01:44 [CC---]    3768320 B 1472200 bps 1004,1019
2013/02/02 11:01:49 [CC---]    6881280 B 1725716 bps 1004,1019
2013/02/02 11:01:54 [CC---]    7405568 B  677135 bps 1004,1019
Segmentation fault

Both calls produce reasonable identical output. However, there is still the Segmentation fault, but I think this is an issue on its own. Maybe it boils down to platform specific EOF implementation?

tyler123durden commented 11 years ago

In the first command I think you should use only 2 slashes, not 3: pi@raspberrypi ~/test/ublox/rtk $ str2str -in serial:///dev/ttyAMA0#ubx -out test06.rtcm3#rtcm3

The Segmentation fault is hard to estimate without further debugging information, try running str2str with trace option, -t 5

Have you compiled str2str from this repo or have you used the official rtklib build? Because I have already fixed some alignment bugs in the ublox code, maybe that does the trick already.

Or fire up str2str with gdb and start debugging like described here: http://www.unknownroad.com/rtfm/gdbtut/gdbsegfault.html

wolfgangr commented 11 years ago

tyler123durden commented

In the first command I think you should use only 2 slashes, not 3:

same picture

Have you compiled str2str from this repo or have you used the official rtklib build? Because I have already fixed some alignment bugs in the ublox code, maybe that does the trick already.

no, its from the official rtklib_2.4.2b9 I'll try to get the eclipse environment running and then do a test.

Or fire up str2str with gdb

I'm afraid, I have to learn that, too...

tyler123durden commented 11 years ago

so, I fired up str2str and the correct syntax is only the device name, without the leading /dev so the command is like that:

./str2str -in serial://urandom#ubx -out /home/pi/test06.rtcm3#rtcm3 -t 5
stream server start
2013/02/03 10:47:31 [CC---]          0 B       0 bps 1004,1019
^Cstream server stop

I've use some random data to look it str2str starts, so there is no valid output, but no crashes. Also use the -t 5 option to generate str2str.trace file

The Segmentation Fault may also result from an invalid input file, maybe ended incorrect.

Btw: You don't need eclipse to compile this version, you can also the rtklib make command. In fact eclipse is nice to develop, but you also would have to set up a cross comile toolchain, to build proper binaries for the raspberry pi from another development machine (or run eclipse on the pi). This would speed up compilation, but you have to transfer the binaries on the target. Like (incomplete) described here: https://github.com/tyler123durden/rtklib/wiki/Remote-Debugging

wolfgangr commented 11 years ago

the correct syntax is only the device name, without the leading /dev

Thanks for the guessswork!

Like (incomplete) described here: https://github.com/tyler123durden/rtklib/wiki/Remote-Debugging

this is what I am doing my tries at the moment:

first idea was to install eclipse on the raspi. wanted 444 MB diskspace or so. Did not fit on my SD-card any more. Actually planned to launch a wiki page on my experiences this afternoon. If you don't mind, I can edit your stub instead.

hang on, how do I submit this comment without closing the issue? there is a "Close&Comment" button I can activate, and a "Comment" only which does not accept click events.

wolfgangr commented 11 years ago

aha, now I have a grey "Reopen & Comment" and a green "Comment"

wolfgangr commented 11 years ago

but this time, the green comment seems to work. weired.

tyler123durden commented 11 years ago

This is what I am doing my tries at the moment:

  • eclipse cross compile / debug
  • geany on the raspi

I don't use any X system on my PI, I use ssh only. In my opinion, the best setup would be:

Of course you can update the wiki, it's public.

wolfgangr commented 11 years ago

the correct syntax is only the device name, without the leading /dev

This was it.

str2str -in serial://ttyAMA0:9600 -out test06.rtcm3 -t 1

will connect to the device and produce an ever growing binary file.

So, it's a pure documentation issue. Maybe it would be nice to update the manual and/or the -h output.

I'll mark this issue as closed . I'll open a seperate one for the segfault issue

andreadaledale commented 10 years ago

hello to everybody. i start to play with raspberry and a gps module mod. lassen iq i compiled rtklib 2.4.2 if i start str2str -in serial://ttyAMA0:38200 -out test.test -t 1 everything work propely and i get a file with nmea messages. at this point i would like start str2str as server mode on the raspi like this :str2str -in serial://ttyAMA0:38200 -out tcpsvr://:5003 and collect data with rtknavi from another pc . seems everythings work , but i can see the data cause the gps module only send in nmea......... my question is if i buy ublox neo- 6p it should work??????? if not wich gps module i have to buy to make it easy?????? thanks a lot

yjmenezes commented 10 years ago

Andrea

To use rtklib you need raw carrier phase data. The lassen IQ has this feature but i have tried to get it working without success. Poor documentation, a hidden feature, i guess. I wrote some C code to set LassenIQ but i froze for a while. Have you tryed to enable raw from iQLassen ?

ublox Neo-6P and LEA-T series are raw capable and they are rtklib ready.

i hope it helps.

cheers,

julio menezes

Date: Wed, 16 Apr 2014 01:50:34 -0700 From: notifications@github.com To: rtklib@noreply.github.com Subject: Re: [rtklib] " stream server start error" when reading from serial device (#1)

hello to everybody.

i start to play with raspberry and a gps module mod. lassen iq

i compiled rtklib 2.4.2

if i start str2str -in serial://ttyAMA0:38200 -out test.test -t 1 everything work propely and i get a file with nmea messages.

at this point

i would like start str2str as server mode on the raspi like this :str2str -in serial://ttyAMA0:38200 -out tcpsvr://:5003

and collect data with rtknavi from another pc .

seems everythings work , but i can see the data cause the gps module only send in nmea.........

my question is if i buy ublox neo- 6p it should work???????

if not wich gps module i have to buy to make it easy??????

thanks a lot

— Reply to this email directly or view it on GitHub.

andreadaledale commented 10 years ago

Hy julio,Thanks for your answer,I enabled row .data from lassen iq but doesnt work......i will buy ublox module.Hope.everytings will work propely. I will.let you know......Bye andrea.Inviato da Samsung Mobile yjmenezes ha scritto:Andrea

To use rtklib you need raw carrier phase data.

The lassen IQ has this feature but i have tried to get it working without success. Poor documentation, a hidden feature, i guess. I wrote some C code to set LassenIQ but i froze for a while. Have you tryed to enable raw from iQLassen ?

ublox Neo-6P and LEA-T series are raw capable and they are rtklib ready.

i hope it helps.

cheers,

julio menezes

Date: Wed, 16 Apr 2014 01:50:34 -0700

From: notifications@github.com

To: rtklib@noreply.github.com

Subject: Re: [rtklib] " stream server start error" when reading from serial device (#1)

hello to everybody.

i start to play with raspberry and a gps module mod. lassen iq

i compiled rtklib 2.4.2

if i start str2str -in serial://ttyAMA0:38200 -out test.test -t 1 everything work propely and i get a file with nmea messages.

at this point

i would like start str2str as server mode on the raspi like this :str2str -in serial://ttyAMA0:38200 -out tcpsvr://:5003

and collect data with rtknavi from another pc .

seems everythings work , but i can see the data cause the gps module only send in nmea.........

my question is if i buy ublox neo- 6p it should work???????

if not wich gps module i have to buy to make it easy??????

thanks a lot

Reply to this email directly or view it on GitHub.

—Reply to this email directly or view it on GitHub.

yjmenezes commented 10 years ago

Hi Andrea.

""Hy julio,Thanks for your answer,I enabled row .data from lassen iq but doesnt work......i will buy ublox module.Hope.everytings will work propely. I will.let you know......Bye andrea.Inviato da Samsung Mobile yjmenezes ha scritto:Andrea""

I have 12 iQlassem modules im my shelf. Could you, please, give me some directions how to enable raw-carrier phase. This way i will be able to continue my C coding.

Not all u-blox models are raw carrier phase capable. I have one 4T, very nice receiver. I will help you with ublox settings, if you will need.

cheers,

julio menezes

tednav commented 9 years ago

Hi,all Here is a file explain what I have down and the problem I have meet.Can you give me some advice? Thank you very much! http://community.emlid.com/t/some-problem-about-rtknavi-and-strsvr/742

yjmenezes commented 9 years ago

Hi Taylor,

As you are sending 1006, i think you must set your base station id/lat/lon/h.

6)Setup the STRSVR options.

i hope it solve. let me know, please.

[]s julio PS: ( i use str2str under Linux )

Date: Mon, 3 Aug 2015 20:46:53 -0700 From: notifications@github.com To: rtklib@noreply.github.com CC: yjmenezes@hotmail.com Subject: Re: [rtklib] " stream server start error" when reading from serial device (#1)

Hi,all

Here is a file explain what I have down and the problem I have meet.Can

you give me some advice? Thank you very much!

http://community.emlid.com/t/some-problem-about-rtknavi-and-strsvr/742

— Reply to this email directly or view it on GitHub.

tednav commented 9 years ago

Hi,yjmenezes. With your help I slove this prbolem.Here I want to ask you how to change the UBLOX baud rate by !UBX CFG-PRT?

yjmenezes commented 9 years ago

Hi Tyler123

take a look rtklib 2.4.2 Manual, page 10. attached u-blox doc

why do you wanna change baudrate ? bandwidth ?

cheers,

julio menezes

Date: Wed, 12 Aug 2015 05:50:01 -0700 From: notifications@github.com To: rtklib@noreply.github.com CC: yjmenezes@hotmail.com Subject: Re: [rtklib] " stream server start error" when reading from serial device (#1)

Hi,yjmenezes.

With your help I slove this prbolem.Here I want to ask you how to change the UBLOX baud rate by !UBX CFG-PRT?

— Reply to this email directly or view it on GitHub.

tednav commented 9 years ago

Hi, I want to change the baudrate ,because someone tell me 9600 is too slow to RTKLIB.

2015-08-13 23:32 GMT+08:00 julio cesar de menezes notifications@github.com :

Hi Tyler123

take a look rtklib 2.4.2 Manual, page 10. attached u-blox doc

why do you wanna change baudrate ? bandwidth ?

cheers,

julio menezes

Date: Wed, 12 Aug 2015 05:50:01 -0700 From: notifications@github.com To: rtklib@noreply.github.com CC: yjmenezes@hotmail.com Subject: Re: [rtklib] " stream server start error" when reading from serial device (#1)

Hi,yjmenezes.

With your help I slove this prbolem.Here I want to ask you how to change the UBLOX baud rate by !UBX CFG-PRT?

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub https://github.com/tyler123durden/rtklib/issues/1#issuecomment-130730964 .

yjmenezes commented 9 years ago

Hi teduav !

I think you must first: a) disable all unnecessary messages, NMEA=off b) test with receiver default. ( u-blox 4T default is 57600 ). c) change default and increase baudrate from 9600 to 19200. ( radio link works better with low baudrate )

i hope it helps.

regards, julio menezes

Date: Fri, 14 Aug 2015 00:55:22 -0700 From: notifications@github.com To: rtklib@noreply.github.com CC: yjmenezes@hotmail.com Subject: Re: [rtklib] " stream server start error" when reading from serial device (#1)

Hi,

I want to change the baudrate ,because someone tell me 9600 is too slow

to RTKLIB.

2015-08-13 23:32 GMT+08:00 julio cesar de menezes notifications@github.com

:

Hi Tyler123

take a look rtklib 2.4.2 Manual, page 10.

attached u-blox doc

why do you wanna change baudrate ? bandwidth ?

cheers,

julio menezes

Date: Wed, 12 Aug 2015 05:50:01 -0700

From: notifications@github.com

To: rtklib@noreply.github.com

CC: yjmenezes@hotmail.com

Subject: Re: [rtklib] " stream server start error" when reading from

serial device (#1)

Hi,yjmenezes.

With your help I slove this prbolem.Here I want to ask you how to change

the UBLOX baud rate by !UBX CFG-PRT?

Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHub

https://github.com/tyler123durden/rtklib/issues/1#issuecomment-130730964

.

— Reply to this email directly or view it on GitHub.