goGPS-Project/goGPS_Java

Couldn't get messages with Ntrip user. Java GoGPS

Opened this issue · 3 comments

Hi!

We are a researcher team trying to correct the mobile position with Ntrip and data from sattelites.

We saw your open code some weeks ago and it helped to connect through Ntrip. One problem we have is that we can get connected to the public interface with no user and get some messages which we have decodified. When we try to connect with our own user we are able to do it but it does not go through a condicional similar you have in your
code line 726 in goGPS_Java/src/main/java/org/gogpsproject/producer/parser/rtcm3/RTCM3Client.java

I don't know if you could have any idea why this is happening has the only error reported is Connetion reset.

This is te part of the code where we have the problem we think.

Also, one question we have, it is, if goGPS corrects the positions or the observations from the rover when it corrects in RTK.

Thank you in advanced.

We saw your open code some weeks ago and it helped to connect through Ntrip. One problem we have is that we can get connected to the public interface with no user and get some messages which we have decodified. When we try to connect with our own user we are able to do it but it does not go through a condicional similar you have in your code line 726 in goGPS_Java/src/main/java/org/gogpsproject/producer/parser/rtcm3/RTCM3Client.java

I'm sorry I don't understand what you mean. Do you have a stack trace and some example code? I haven't used RTCM myself but happy to look into it.

Hi Ziglio, yes, the part of the code where we are stuck is this one:

                    try(Socket socket = new Socket(casterIp, port)){
                        OutputStream output = socket.getOutputStream();
                        PrintWriter writer = new PrintWriter(output, true);
                        input = socket.getInputStream();
                        InputStreamReader inRead = new InputStreamReader(input);
                        BufferedReader reader = new BufferedReader(inRead);
                        Log.e("crea ", "bufferedreader");

                        writer.println("GET /"+ mountPoint.getName()+" HTTP/1.1");
                        //writer.println("GET / HTTP/1.1");
                        writer.println("Host: "+ casterIp);
                        writer.println("Ntrip-Version: Ntrip/1.0");
                        writer.println("User-Agent: NTRIP NtripClient/1.0");
                        writer.println("Accept: */*");
                        writer.println("Connection: close");
                        writer.println("Authorization: Basic " + base64);
                        writer.println(NMEAJaen);

                        writer.flush();
                        String line;
                        int c;
                        int i = 0;
                        online = true;

                        while ((line = reader.readLine()) != null){
                            Log.e("in ", "while");
                            c = input.read();
                            if(c == 211){
                                Object o = readMessage(input);
                            }
                        }

                        //input.read();
                        Log.e("Termina ","termina");

                        reader.close();
                        inRead.close();
                        writer.close();

                    } catch (UnknownHostException ex){
                        Log.e("Server not found: ", ex.getMessage());
                    } catch (IOException ex){
                        Log.e("I/O error: ",ex.getMessage());
                    }
                }
            }catch(IOException e){
                e.printStackTrace();
            }

We are able to establish connection, has we get the connection confirmation message, but it never goes through the condicional c=211 and after some minutes we get the error Connection reset.

As I said in the previous comment, we are able to connect without problems with the public identification and we could work with some messages, but not with a private configuration.

Do you know what could be the problem?

Thank you again.

Is this a different issue from the other one? #39
Maybe it would be useful to look at this code too: https://gitlab.com/TeamGEOLOC/geolocpvt/-/blob/master/gogps/src/main/java/org/gogpsproject/producer/parser/rtcm3/RTCM3Client.java

It looks like you guys are trying to run it on Android too.
I'm still trying to figure it out how to create an RTCM account. Do you have a link for me? thanks