Issues implementing GPS on HTCC-AB01

Im tryng to implement the NEO-6M-GPS module with TinyGPS on a HTCC-AB01. Even though the same library and module works when used with as esp32 i cant get it to work on this cubecell. please help. here is the most basic example i could think and that doesnt work

ISSUE : The device doesnt seem to get anything from gps_serial.available.

#include <Arduino.h>
#include <TinyGPS++.h>

// Pinos padrão do HTCC-AB01 (Serial1)
#define GPS_RX 14 // Conectado ao TX do GPS
#define GPS_TX 15 // Conectado ao RX do GPS

#define VEXT 21 // Pino que controla VEXT

HardwareSerial gpsSerial(1); // Usar UART1
TinyGPSPlus gps;

void setup() {
pinMode(Vext, OUTPUT);
digitalWrite(Vext, LOW); // Ativa VEXT (baixa para ativar)

Serial.begin(115200); // USB serial
delay(1000);
Serial.println(“Iniciando GPS…”);

gpsSerial.begin(9600, SERIAL_8N1, GPS_RX, GPS_TX); // Inicializa UART1

Serial.println(“Esperando dados do GPS…”);
}

void loop() {
// Leitura contínua do GPS
while (gpsSerial.available() > 0) {
char c = gpsSerial.read();
gps.encode©; // Processa caractere
Serial.write©; // Mostra sentenças NMEA (debug)
}

// Mostra dados processados
if (gps.location.isUpdated()) {
Serial.println("========== FIX OBTIDO ==========");
Serial.print("Latitude: "); Serial.println(gps.location.lat(), 6);
Serial.print("Longitude: "); Serial.println(gps.location.lng(), 6);
Serial.print("Satélites: "); Serial.println(gps.satellites.value());
Serial.print("HDOP: "); Serial.println(gps.hdop.hdop());
Serial.print("Altitude: "); Serial.println(gps.altitude.meters());
Serial.print(“Velocidade: “);Serial.println(gps.speed.kmph());
Serial.println(”================================”);
delay(2000); // Espera para nova leitura
}
}

The main problem is that you have effectively defined your serial port twice. The TX & RX pins that you are using for the GPS module are the same transmit and receive pins that are ultimately used by the USB interface, so you’ll have to forget about using the Serial Monitor while you’re using the GPS. Unless you’re going to use LoRa to report your GPS data, the CubeCell is probably the wrong platform to be using here.

I have, however, used a CubeCell to manage an RS485 interface, using the TX & RX pins (without using the USB port at the same time—I had to upload the sketch, disconnect the USB cable, then reboot the CubeCell, and report data using LoRa), so it may be possible, if not entirely practical.

I have, nonetheless, used a NEO-6M-GPS module with a CubeCell Plus [HTCC-AB02], which has two UARTs (and an onboard display) and thus allows the GPS module to be configured on the second one while using the first for the Serial Monitor.

i thought that was the case. its because this device only has one UART interface right ?

i tried using “softSerial.h” to burlate the limit, but that didnt seem to work. is it the same reason ?

Yes, it only has a single UART and that UART uses the pins labelled TX and RX. It wouldn’t matter what else you used if you were trying to use the TX and RX pins for anything else—they always go to the same place and if you are using the USB interface for serial communications, they are already being used for that purpose.