Trouble with using UART with F9R for NTRIPClient_With_GGA_Callback example

void setup()
{
  Serial.begin(115200);
  while(!Serial.available());//Wait until we see the serial port
  Serial.println(F("NTRIP testing"));

  //Wire.begin(); //Start I2C
  Serial1.begin(115200);
  while (myGNSS.begin(Serial1) == false) //Connect to the Ublox module using Serial port
  {
    Serial.println(F("u-blox GPS not detected at Serial1. Please check wiring."));
    delay(2000);
  }
  Serial.println(F("u-blox module connected"));
  uint8_t ok = myGNSS.setUART1Output(COM_TYPE_UBX | COM_TYPE_NMEA | COM_TYPE_RTCM3);//setI2COutput(COM_TYPE_UBX | COM_TYPE_NMEA);//Set the UART1 port to output both NMEA and UBX messages
  if (ok) Serial.println(F("setUART1Output"));
  if (ok) ok = myGNSS.setPortInput(COM_PORT_UART1 , COM_TYPE_UBX | COM_TYPE_NMEA | COM_TYPE_RTCM3); //COM_PORT_I2C//Be sure RTCM3 input is enabled. UBX + RTCM3 is not a valid state.
  if (ok) Serial.println(F("setPortInput"));
  if (ok) ok = myGNSS.setDGNSSConfiguration(SFE_UBLOX_DGNSS_MODE_FIXED); // Set the differential mode - ambiguities are fixed whenever possible
  if (ok) Serial.println(F("setDGNSSConfiguration"));
  if (ok) ok = myGNSS.setNavigationFrequency(1); //Set output in Hz.
  if (ok) Serial.println(F("setNavigationFrequency"));
  // Set the Main Talker ID to "GP". The NMEA GGA messages will be GPGGA instead of GNGGA
  if (ok) ok = myGNSS.setMainTalkerID(SFE_UBLOX_MAIN_TALKER_ID_GP);
  if (ok) Serial.println(F("setMainTalkerID"));
  if (ok) ok = myGNSS.setNMEAGPGGAcallbackPtr(&pushGPGGA); // Set up the callback for GPGGA
  if (ok) Serial.println(F("setNMEAGPGGAcallbackPtr"));
  if (ok) ok = myGNSS.enableNMEAMessage(UBX_NMEA_GGA, COM_PORT_UART1, 10); //COM_PORT_I2C Tell the module to output GGA every 10 seconds
  if (ok) Serial.println(F("enableNMEAMessage"));
#ifdef RTCMCheckOK
  if (ok) ok = myGNSS.setVal8(UBLOX_CFG_MSGOUT_UBX_RXM_COR_UART1, 1); // UBLOX_CFG_MSGOUT_UBX_RXM_COR_I2C//Enable UBX-RXM-COR messages on I2C
  if (ok) Serial.println(F("setVal8"));
#endif
  if (ok) ok = myGNSS.setAutoPVTcallbackPtr(&printPVTdata); // Enable automatic NAV PVT messages with callback to printPVTdata so we can watch the carrier solution go to fixed
  if (ok) Serial.println(F("setAutoPVTcallbackPtr"));
#ifdef RTCMCheckOK
  if (ok) ok = myGNSS.setRXMCORcallbackPtr(&printRXMCOR); // Print the contents of UBX-RXM-COR messages so we can check if the PMP data is being decrypted successfully
  if (ok) Serial.println(F("setRXMCORcallbackPtr"));
#endif
  //myGNSS.saveConfiguration(VAL_CFG_SUBSEC_IOPORT | VAL_CFG_SUBSEC_MSGCONF); //Optional: Save the ioPort and message settings to NVM
  Serial.print(F("GNSS: configuration "));
  Serial.println(OK(ok));
  //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

So I am checking to make sure every configuration is being accepted by the F9R.

When RTCMCheckOK is defined the following is failing:

if (ok) ok = myGNSS.setVal8(UBLOX_CFG_MSGOUT_UBX_RXM_COR_UART1, 1); // UBLOX_CFG_MSGOUT_UBX_RXM_COR_I2C//Enable UBX-RXM-COR messages on I2C
  if (ok) Serial.println(F("setVal8"));

I know this because the “setVal8” is not being printed but “enableNMEAMessage” is.

If RTCMCheckOK is not defined then all the enable conditions are set and “GNSS: configuration → OK” is printed.

Any thoughts as to why “myGNSS.setVal8(UBLOX_CFG_MSGOUT_UBX_RXM_COR_UART1, 1)” is failing?

Thanks

Bruce

Hi Bruce,

You’re testing the edge cases for us again. Thanks - keeps us on our toes…!

Looking at the interface description for F9-HPS-1.21 - the firmware I’m guessing you’re running on your F9R - I’m not seeing CFG-MSGOUT-UBX_RXM_COR listed in the Key IDs. But it does list the UBX-RXM-COR message itself. I guess you have to enable it using CFG MSG instead? Please try myGNSS.enableMessage(UBX_CLASS_RXM, UBX_RXM_COR, COM_PORT_UART1, 10);

I know u-blox have a big update planned for the F9R. I’m guessing that will include the Key IDs for CFG-MSGOUT-UBX_RXM_COR.

Cheers,

Paul

I guess my bad hear is that I only have HSP 1.2 :cry: ! I am still waiting on the ridiculous NDA process to be able to update to 1.21. Yep I know that they are looking at a HSP2.0 update? But again it is almost impossible to get anywhere without and NDA.

Thanks…

Didn’t like that either…don’t think the F9R plays nice with UBX_RXM_COR message.

Thanks

Bruce

Even with 1.21…still does not like UBX_RXM_COR

Thank

Bruce