RAK12500 Preventing the use of Serial 1

hello, looking for help

My set up:
Baseboard 19007
RAK4630
RAK12500 GNSS (slot A)
RAK12002 RTC (slot C)
IO Expansion + custom Serial sensor

The problem that I’ve been struggling with for the last few days is that I am unable to read data from Serial1 from my sensor when the GNSS module is plugged in and in use. I’ve set the GNSS module to I2C mode (Using the github example). Obviously the GNSS module is still connected to the Serial1 pins but is it possible to be able use the Serial1 pins freely while using the GNSS module?

My sensor code works perfectly before I initialise the GNSS and then as soon as that happens, I get unreadable data.

Any advice?

Welcome to the forum @tommiS

What library are you using for the RAK12500?
Some libraries have functions to set the RAK12500 to use only I2C and not Serial.

I am usually using the SparkFun_u-blox_GNSS_Arduino_Library, which has some functions to set the output for the different outputs:

boolean setI2COutput(uint8_t comSettings, uint16_t maxWait = 250);				//Configure I2C port to output UBX, NMEA, RTCM3 or a combination thereof
boolean setUART1Output(uint8_t comSettings, uint16_t maxWait = defaultMaxWait); //Configure UART1 port to output UBX, NMEA, RTCM3 or a combination thereof
boolean setUART2Output(uint8_t comSettings, uint16_t maxWait = defaultMaxWait); //Configure UART2 port to output UBX, NMEA, RTCM3 or a combination thereof
boolean setUSBOutput(uint8_t comSettings, uint16_t maxWait = 250);				//Configure USB port to output UBX, NMEA, RTCM3 or a combination thereof
boolean setSPIOutput(uint8_t comSettings, uint16_t maxWait = 250);				//Configure SPI port to output UBX, NMEA, RTCM3 or a combination thereof

I never tried, but

setUART1Output(0);
setUART2Output(0);

might help.

Thank you Bernd, that worked perfectly for me. I appreciate the help.

Cheers,
Tommi