GPS RTK2 (ZED-F9P) example sketch for Base station does not call SFE_UBLOX_GPS::processRTCM

Hello,

I am trying to get the ZED-F9P/Example3_StartRTCMBase sketch to produce RTCM output. I have a Arduino MKR 1500 connected over I2C to a Sparkfun GPS-RTK2 board.

I can run most of the examples to get a position fix and have previously completed a succesful Survey-in mode operation. However it seems that the SFE_UBLOX_GPS::processRTCM callback is never called.

The code i am using is commit 0e07bcc on 14 May and the Ublox library is version 1.6 (most recent).

I’m pretty sure the GPS module is doing something because if i add the enableDebugging() statement in the setup() method, i get feedback about bytes available. See an output example below.

Is this a bug in the library? Am i missing something obvious?

Any help much appreciated!

20:22:27.797 → Ublox Base station example

20:22:28.012 → Press any key to send commands to begin Survey-In

20:22:31.901 → RTCM messages enabled

20:22:32.194 → Survey started. This will run until 60s has passed and less than 5m accuracy is achieved.

20:22:32.194 → Survey valid!

20:22:32.194 → Base survey complete! RTCM now broadcasting.

20:22:32.301 → Zero bytes available

20:22:32.549 → Zero bytes available

20:22:32.797 → Zero bytes available

20:22:33.050 → Bytes available:413

20:22:33.305 → Bytes available:438

20:22:33.555 → Bytes available:438

20:22:33.806 → Bytes available:438

20:22:34.052 → Bytes available:837

20:22:34.304 → Bytes available:862

20:22:34.552 → Bytes available:862

20:22:34.813 → Bytes available:862

20:22:35.059 → Bytes available:1300

20:22:35.313 → Bytes available:1300

20:22:35.569 → Bytes available:1300

20:22:35.821 → Bytes available:1300

20:22:36.069 → Bytes available:1738

20:22:36.315 → Bytes available:1738

20:22:36.567 → Bytes available:1738

20:22:36.823 → Bytes available:1738

20:22:37.069 → Bytes available:2162

Hi gpsrobin,

If you are trying to get RTCM data via I2C to your MKR 1500, I am pretty sure the issue is with this line:

myGPS.setI2COutput(COM_TYPE_UBX);

This needs to be switched to:

myGPS.setI2COutput(COM_TYPE_UBX | COM_TYPE_RTCM3);

This enables RTCM data output over I2C. As far as I can recall, the issue with this line and the processRTCM function should have been fixed with [this pull request as [this forum topic covers. I am not sure why it has reverted or somehow gone missing. I will look into that and we’ll get that fixed soon.

I would recommend enabling RTCM data over I2C and if that does not resolve the issue, then move on to editing the processRTCM function. If you’re still having trouble after trying these suggestions, let me know and we can troubleshoot further.](uBlox ZED-F9P: Not seeing RTCM output - SparkFun Electronics Forum)](Fixed incorrect call to processRTCMframe() in lib. Updated ex 3 and 4… · sparkfun/SparkFun_Ublox_Arduino_Library@0e07bcc · GitHub)

Hi TS-Mark,

I tried setting the I2C output to

myGPS.setI2COutput(COM_TYPE_UBX|COM_TYPE_RTCM3); 

But that did not help. The void SFE_UBLOX_GPS::processRTCM method still does not do anything.

So i worked around it by using the RX2/TX2 pins on the GPS-RTK2 board and reading them with Serial1 on the Arduino MKR.

However that led to the next problem: I’m not sure if the Serial output from the Base station GPS-RTK2 board produces the same byte stream. I’m getting stuff like:

D306D4320038A4D166001508A000020080057DA9A1A32823256E41864D64BC9893E7155BA3673EB7209E393E3545958AF9542414D8F45D53D107FF9716FE7838FCC174153CB464BEF3332EF2C0D61A5D24EED7180000000000000000000FF499B

But i do not know how to validate the contents to see if i am missing anything such as the wrong endian or encoding.

I’m attempting to stream the RTCM3 correction messages from a ‘Base station’ GPS-RTK2 board to another ‘Rover’ GPS-RTK2 board over an http link. For the moment i can connect the pins on the GPS-RTK2 board from the base station to another arduino, read that through Serial and get an RTK fix. However if i attempt to stream the data over an http link (websocket) the rover does not get an RTK fix.

I doubt i am the first (or last) to try this. Is there a guide or example somewhere?

Any help is appreciated!

Thanks, Robin

Hi again Robin,

Hmm, I’ll try doing some more digging and testing with the library to see what is going on here. I wonder if you possibly need to set the I2C pins for your Arduino MKR but the Wire Library should handle that for all Arduino-made boards. That could fix the issue and all you would need to do is edit the “Wire.begin();” function to call the specific pins for SDA and SCL on the MKR. You could also try setting up the I2C output to be JUST RTCM3 data.

As for streaming the data over an http link, I’m afraid we do not have any guides for that at the moment. I will try asking around here to see if anyone has some insight or experience with that and hopefully, we can at least point you in the right direction or give you some tips.

Hi Mark,

  1. Do you mean change the Wire.begin() method in the arduino library?

  2. Setting the I2C output to be JUST RTCM3 data did not help.

All the methods on SFE_UBLOX_GPS seem to work; just the processRTCM callback is never called.

My workaround of getting the data off the base station ZED-F9P serial port seems to provide valid RTCM3 messages when i wire that directly to the rover ZED-F9P. It also works when i wire the base station ZED-F9P to the Rover Arduino’s serial port and send that to the rover ZED-F9P through I2C.

Right now the main hurdle seems to be sending the Base station RTCM3 output over HTTP to the Rover. I am using a websocket. Sending byte by byte is not practical over HTTP so i need to send a byte array. How could i verify the byte array is valid RTCM3 at the Rover side? Are there delimiters or other bytes a can check?

Thanks for any help!

Robin

Hi again Robin,

  1. Do you mean change the Wire.begin() method in the arduino library?
Yes. Try defining the SDA and SCL pins in that function and see if it helps. The format should be Wire.begin(SDA Pin#, SCL Pin#).
  1. Setting the I2C output to be JUST RTCM3 data did not help.
I will try testing this with a known good to confirm the code is working properly.

As for help processing RTCM data over HTTP, I’m afraid that is a bit beyond the scope of our support abilities as we do not have any tutorials or example for that specific use-case. The library only supports the transmission of RTCM data using the “processRTCM()” function. There are some notes for this function in the library [here that might help you send the data in an array.

Also, if you have not already read through them, the [ZED-F9P Integration Manual and the [ZED-F9P Interface Description Document will be the most complete resources for sending RTCM data.](https://cdn.sparkfun.com/assets/learn_tutorials/8/5/6/ZED-F9P_UBX_NMEA_and_RTCM_protocols.pdf)](https://cdn.sparkfun.com/assets/learn_tutorials/8/5/6/ZED-F9P_Integration_Manual.pdf)](SparkFun_Ublox_Arduino_Library/src/SparkFun_Ublox_Arduino_Library.cpp at master · sparkfun/SparkFun_Ublox_Arduino_Library · GitHub)