goblimey / ntripcaster

Docker file and instructions to build and run the BKG NTRIP caster
GNU General Public License v3.0
93 stars 36 forks source link

Server does not receive data from station #4

Closed mateusmsantin closed 1 year ago

mateusmsantin commented 1 year ago

Hey guys, see if you can help me. I configured a Reach RS2+ from emlid as a base and pointed to the IP address of the NTRIP server. Current situation after the first tests: 1 - I left the IP of the internal network for testing 192.168.1.10 (NTRIP server) I can see in the server log the message BAD PASSWORD, if I put a password different from the configured one, but the base (RS2+) does not connect to the NTRIP server.

2023-06-20 08:53:22 [20/Jun/2023:11:53:22] NtripCaster Version 0.1.5 Starting.. 2023-06-20 08:53:22 NtripCaster Version 0.1.5 Initializing... 2023-06-20 08:53:22 NtripCaster comes with NO WARRANTY, to the extent permitted by law. 2023-06-20 08:53:22 You may redistribute copies of NtripCaster under the terms of the 2023-06-20 08:53:22 GNU General Public License. 2023-06-20 08:53:22 For more information about these matters, see the file named COPYING. 2023-06-20 08:53:22 Starting thread engine... [20/Jun/2023:11:53:22] Using stdout as NtripCaster logging window [20/Jun/2023:11:53:22] Starting main connection handler... [20/Jun/2023:11:53:22] Listening on port 2101... [20/Jun/2023:11:53:22] Using 'localhost' as servername... [20/Jun/2023:11:53:22] Server limits: 100 clients, 100 clients per source, 40 sources [20/Jun/2023:11:53:22] Starting Calender Thread... [20/Jun/2023:11:53:22] Bandwidth:0.000000KB/s Sources:0 Clients:0 [20/Jun/2023:11:53:23] Kicking source 0 [172.17.0.1] [No NTRIP source] [encoder], connected for 0 seconds, 0 bytes transfered. -1 sources connected [20/Jun/2023:11:53:23] Kicking all 0 clients for source 0 [20/Jun/2023:11:53:48] Socket error on connection 1 [20/Jun/2023:11:53:48] Kicking unknown 1 [172.17.0.1] [Socket error], connected for 20 seconds [20/Jun/2023:11:53:53] Kicking source 2 [172.17.0.1] [No NTRIP source] [encoder], connected for 0 seconds, 0 bytes transfered. -1 sources connected [20/Jun/2023:11:53:53] Kicking all 0 clients for source 2 [20/Jun/2023:11:54:19] Socket error on connection 3 [20/Jun/2023:11:54:19] Kicking unknown 3 [172.17.0.1] [Socket error], connected for 21 seconds [20/Jun/2023:11:54:22] Bandwidth:0.000000KB/s Sources:0 Clients:0 [20/Jun/2023:11:54:24] Kicking source 4 [172.17.0.1] [No NTRIP source] [encoder], connected for 0 seconds, 0 bytes transfered. -1 sources connected [20/Jun/2023:11:54:24] Kicking all 0 clients for source 4 [20/Jun/2023:11:54:34] Kicking unknown 6 [172.17.0.1] [No NTRIP client], connected for 0 seconds [20/Jun/2023:11:54:42] Socket error on connection 7 [20/Jun/2023:11:54:42] Kicking unknown 7 [172.17.0.1] [Socket error], connected for 3 seconds [20/Jun/2023:11:54:48] Socket error on connection 8 [20/Jun/2023:11:54:48] Kicking unknown 8 [172.17.0.1] [Socket error], connected for 6 seconds [20/Jun/2023:11:54:48] Kicking unknown 9 [172.17.0.1] [No NTRIP client], connected for 0 seconds [20/Jun/2023:11:54:49] Socket error on connection 5 [20/Jun/2023:11:54:49] Kicking unknown 5 [172.17.0.1] [Socket error], connected for 20 seconds [20/Jun/2023:11:54:54] Kicking source 11 [172.17.0.1] [No NTRIP source] [encoder], connected for 0 seconds, 0 bytes transfered. -1 sources connected [20/Jun/2023:11:54:54] Kicking all 0 clients for source 11 [20/Jun/2023:11:55:13] Socket error on connection 12 [20/Jun/2023:11:55:13] Kicking unknown 12 [172.17.0.1] [Socket error], connected for 14 seconds [20/Jun/2023:11:55:13] Kicking source 13 [172.17.0.1] [Bad Password] [encoder], connected for 0 seconds, 0 bytes transfered. -1 sources connected [20/Jun/2023:11:55:13] Kicking all 0 clients for source 13 [20/Jun/2023:11:55:14] Socket error on connection 10 [20/Jun/2023:11:55:14] Kicking unknown 10 [172.17.0.1] [Socket error], connected for 21 seconds [20/Jun/2023:11:55:19] Kicking unknown 15 [172.17.0.1] [No NTRIP client], connected for 0 seconds [20/Jun/2023:11:55:22] Bandwidth:0.000000KB/s Sources:0 Clients:0 [20/Jun/2023:11:55:38] Socket error on connection 14 [20/Jun/2023:11:55:38] Kicking unknown 14 [172.17.0.1] [Socket error], connected for 20 seconds [20/Jun/2023:11:55:43] Kicking source 17 [172.17.0.1] [Bad Password] [encoder], connected for 0 seconds, 0 bytes transfered. -1 sources connected [20/Jun/2023:11:55:43] Kicking all 0 clients for source 17 [20/Jun/2023:11:55:44] Socket error on connection 16 [20/Jun/2023:11:55:44] Kicking unknown 16 [172.17.0.1] [Socket error], connected for 20 seconds [20/Jun/2023:11:55:49] Kicking unknown 19 [172.17.0.1] [No NTRIP client], connected for 0 seconds [20/Jun/2023:11:56:09] Socket error on connection 18 [20/Jun/2023:11:56:09] Kicking unknown 18 [172.17.0.1] [Socket error], connected for 20 seconds [20/Jun/2023:11:56:14] Kicking source 21 [172.17.0.1] [Bad Password] [encoder], connected for 0 seconds, 0 bytes transfered. -1 sources connected [20/Jun/2023:11:56:14] Kicking all 0 clients for source 21 [20/Jun/2023:11:56:14] Socket error on connection 20 [20/Jun/2023:11:56:14] Kicking unknown 20 [172.17.0.1] [Socket error], connected for 20 seconds [20/Jun/2023:11:56:19] Kicking unknown 23 [172.17.0.1] [No NTRIP client], connected for 0 seconds [20/Jun/2023:11:56:22] Bandwidth:0.000000KB/s Sources:0 Clients:0 [20/Jun/2023:11:56:39] Socket error on connection 22

I put in bold the log stating the wrong password, which leads me to believe that the base connection is being made partially when I put the correct password.

I'm not sure if Reach RS2+ works with ntrip version 1.0, and if that could be the problem, or if the problem is the IP address and not the name.

If someone can give me some help, or even point me to a free server that works with Reach RS2+ I would like to validate the network before continuing with the tests.

goblimey commented 1 year ago

I see that you are setting the server name as localhost. I'm a bit surprised that this config works at all. You should run your caster on a machine with a domain name and set the server name to that.

HOWEVER, that's not causing this problem. (It may cause others.)

One possibility is that you are using the wrong password. You should have configured at least two in your config file, one with no associated user that all base stations use to send data to the caster and then a separate username and password for each endpoint that a rover uses to receive data from that endpoint. Are you trying to connect your base station using an endpoint username and password?

To answer your other question, a google search for "free ntrip service" shows me three free services. I used RTK2Go a few years back. I recall that they only allow NTRIP version 2. Also, the International GNSS Service IGS run a free NTRIP service that you can use to test your rover. Their base stations are widely spaced, so the service may not give very accuracy, but it gives you a known working system if you are trying to debug a connection problem.,

goblimey commented 1 year ago

I left the IP of the internal network for testing 192.168.1.10 (NTRIP server)

Note the comment in the caster config file against the line where you configure the name of your base station - it warns against using a raw IP address. I don't know why that is, but I assume there's some good reason.

I run my caster on a Digital Ocean droplet with a domain name provided by Ionos. That whole thing costs about $75 per year to run.

mateusmsantin commented 1 year ago

I put localhost as it didn't raise the server with an IP address. In fact, any name I put in there (for testing) works.

I did a "google search" and found SNIP, but it is for windows and would like to run on a Linux machine. I managed to set up my base on it and the SNIP server received the coordinates. The only thing I was in doubt between SNIP and BKG's Open Source configuration is that SNIP uses a port to receive data from the base, and another port to send data and another port for the rovers to connect.

Are you trying to connect your base station using an endpoint username and password? No, password only. I think the problem I'm having is not being able to send the data to the server, which is why the caster server doesn't send the corrections.

When I manage to verify the sending of the base to the server and the reception by the rover, I will provide a public IP and share the data.

goblimey commented 1 year ago

I did a "google search" and found SNIP, but it is for windows and would like to run on a Linux machine.

No need to run your own SNIP server. The company that wrote Snip runs a service called rtk2go, which is the snip software running on one of their servers: http://rtk2go.com/

Can be useful for troubleshooting, as it gives you a known working server.

As I said, it's NTRIP version 2, so if, as you suspect, the problem is that your rover can't do NTRIP version 1, that will be no help. It will be able to connect to the rtk2go server but not to your version 1 caster.

HOWEVER, I believe that the NTRIP standard mandates that an NTRIP version 2 client (such as your base) should try to connect via version 2 and drop back to version 1 if that fails. If your base doesn't do that, it's not compliant with the standard.

By the way, I have a Reach RS (not RS+) and it works with the caster.

There is another way to investigate the problem. My github page includes a proxy that might help you debug connection problems: https://github.com/goblimey/ntripproxy

It's written in Go so you will need to install the Go compiler to build it.

The proxy stands between your base station and your caster. You connect your base to the proxy instead of to the caster. When the base sends a request the proxy passes it to the caster. When the caster replies, it passes the response back. It stores the last request and response and offers a web interface that displays them. This gives you a bit of help sorting out connection problems. You can see if the caster is responding at all and if so what the response is.

Run the proxy like so:

./proxy -r {caster server name}:2101 -l {proxy server name} -p 2101 -ca {proxy server name} -cp 5001 -q >/dev/null 2>&1 &

The -r option specifies the name and port of the real caster. (Note the ":".)

The -l and -p options specify the name and port of the proxy

The -ca and -cp options specify the name and port of the reporting service

Start your base station running. To get the status report, point your web browser at:

http://{proxy server name}:5001/status/report

goblimey commented 1 year ago

I just committed a separate version of the proxy with specific support for NTRIP traffic. This version is run in the same way as the original proxy but it keeps the last few RTCM messages and the status report displays them in a readable form. It displays type 4 and type 7 Multiple Signal Messages (MSMs) and the base position messages type 1005 and 1006. Using it you can see what position the base station is broadcasting, which satellites it's receiving signals from, what signals it's seeing and other useful stuff.

goblimey commented 1 year ago

No response from Mateus so I assume that he's happy (or given up in disgust).