tomojitakasu / RTKLIB

2.58k stars 1.63k forks source link

str2str : server start error #626

Closed jupajulle closed 3 years ago

jupajulle commented 3 years ago

Hi!

I am experiencing problems of establishing connection to the serialport while using STR2STR. I am using Rasbian and rasberrypi. I want to stream rtcm3 correction data from the NTRIPserver to a serial port.

I get the datastream from the server in a very "coded" output:

str2str -in ntrip://rtk2go.com:2101/mountpoint#rtcm3 stream server start 2021/09/13 11:53:23 [WC---] 0 B 0 bps (0) connecting... \ufffd8%I3\ufffd\ufffd\ufffd\ufffdXQ\ufffd\ufffd\ufffd\ufffd/ \ufffd\ufffd~w\ufffdqs\ufffd\ufffd\ufffd\ufffd\ufffd\ufffdGk\ufffd_\ufffd\ufffd@\ufffd\ufffd\ufffd\ufffdf%\ufffd\ufffd\ufffdAwF8!|i$<(v\ufffd\u5ff3\ufffd\ufffdE\ufffd!\ufffdM\ufffdJ\ufffd?\ufffdg\ufffd4 \ufffd\ufffd\u05ab m!aD\ufffdI\ufffd\ufffd\ufffdR\ufffd\ufffdT# \ufffd\ufffdE\ufffdj?@f5

etc...

but after I add the serial to the end

str2str -in ntrip://rtk2go.com:2101/agtekrtk#ubx -out serial://dev/tty/ACM1:57600:8:n:1:off#rtcm3

the program outputs "stream server start error"

Where should I start debugging? I think that I have all the in- and outputs set to the same baudrate.

geofis commented 3 years ago

I guess you need to add a space before out, so it should look like this:

str2str -in ntrip://rtk2go.com:2101/agtekrtk#ubx -out serial://dev/tty/ACM1:57600:8:n:1:off#rtcm3

jupajulle commented 3 years ago

I guess you need to add a space before out, so it should look like this:

str2str -in ntrip://rtk2go.com:2101/agtekrtk#ubx -out serial://dev/tty/ACM1:57600:8:n:1:off#rtcm3

unfortunately it wasnt it. the excluded space was my typo-

kriete commented 3 years ago

Maybe this helps? In the systems I normally used it's e.g. ttyACM1 (without the '/'). edit: something like -out serial://ttyACM1:57600:8:n:1:off

jupajulle commented 3 years ago

thaks. that is also an obivous mistake, but it wasnt it . I still get the error. I also tried to use the UART port as serial output of the rasberrypi.

kriete commented 3 years ago

make sure that you have access to the port as the user you're currently logged in to. you could try to do it with a sudo (sudo str2str ...) for now. If that works, then you add your user to the group (i think it's dialout).

geofis commented 3 years ago

Also make sure your source is streaming data. For example, you could first try this:

str2str -in ntrip://rtk2go.com:2101/agtekrtk

If you see some binary text in the console, then the source is streaming data. In addition, rtk2go sources use to have this form:

str2str -in ntrip://USERNAME:PASSWORD@rtk2go.com:2101/MOUNTPNT

But I don't see such convention in your command. I guess those credentials are missing.

jupajulle commented 3 years ago

Also make sure your source is streaming data. For example, you could first try this:

str2str -in ntrip://rtk2go.com:2101/agtekrtk

If you see some binary text in the console, then the source is streaming data. In addition, rtk2go sources use to have this form:

str2str -in ntrip://USERNAME:PASSWORD@rtk2go.com:2101/MOUNTPNT

But I don't see such convention in your command. I guess those credentials are missing.

thanks, but the source is ok. I get the binary text that you mentioned. I have also verified the source and the reciever on windows using the ucenter -software. Now I am just trying to make it work on LInux.

geofis commented 3 years ago

Good.

Is the device ttyACM1 present in the /dev dir with correct ownership? So when you run ls -al /dev ttyACM1 should be listed with the root dialout ownership. This is mine:

pi@raspberry:~ $ ls -al /dev
...
crw-rw----   1 root dialout 166,   0 sep 12 19:16 ttyACM0
...
jupajulle commented 3 years ago

Thanks for the advice!

I have tried with all the serial ports that are displayed in "ls -l /dev" but I believe that "gps1 -> ACM1" is the one I should use

I can get the binary stream from the server with and without using the username and password. -its an open server

I am now also using the sudo for the commands.

For the NTRIP caster I am using the rtkbase. I have my own RTK basestation. https://github.com/Stefal/rtkbase . witch has a great graphics interface for rtklib while using linux.

-edited

I am using the F9P module and the urt ports and usb is configured to recieve RTCM3 message.

geofis commented 3 years ago

You can identify which dev is assigned to your F9P.

With the F9P, run ls -al /dev, so you wont see the dev, for example ttyACM0. After that plug in the F9P, run again ls -al /dev and find out the new dev in the list. If no new dev shows, you run lsusb and see if your U-Blox is listed.

I use rtkbase too. I built a base-rover duo based on Raspberry Pi using rtkbase and my own scripts for the rover.

In addition, it is a good idea to set the rover to receive RTCM messages through an uncrowded port. I was having issues receiving solutions through the USB port because I was also using that port to send RTCM messages (take a look at the first comment of this post). The recommendation is to use UART1 or UART2 to send RTCM messages to the receiver.

jupajulle commented 3 years ago

I added the TCP port number (taken from the RTKbase setupoptions) and removed one "/" slash from the serial:/ .

It started working. str2str -in ntrip://rtk2go.com:2101/agtekrtk -out serial:/dev/ttyACM1:57200:8:n:1:off#5016

Thanks to everybody