Gps does not work in my application after installing Mestastic

I have 2 TTGO T-Beam v07 434Mhz boards that so far worked fine with my own software. It could read GPS data perfectly.
Then I installed the Mestastic firm and it also worked without problems.
The surprise was when I reinstalled my own software again: I can’t read GPS data. The lock led indicates that the position is fixed but I do not receive anything through the serial port.
The funny thing is that again I reinstalled the mestastic firm and the GPS worked.

I have the impression that there is something in the Mestastic firm that causes this type of error.

I have spent many hours looking for the problem, changing the serial port, for hardware, for software and without result. Any ideas?

Hi @eb4cuv, welcome to the community! Odd that switching between firmware changes the GPS behavior.

For your software do you use the UBX protocol or NMEA? Meshtastic prefers UBX so it is possible there is some config that happens that disables NMEA (I haven’t checked).

You could try reset to factory using serial pass through and U Center. There is some good info here "No Sats" status on Oled although this hasn’t been used for the v07 tbeam.

Hi @dafeman, thanks for your answer. My soft uses NMEA. But I think the protocol is not the problem.
The problem is that the serial port either by hardware or by software does not read what in theory the GPS commands.
Maybe doing a factory reset can solve the problem.
But, I don’t know how to do the factory reset and I don’t have the binary file for my card either.
Maybe someone can help me?

If Meshtastic disables NMEA then you will get nothing out of the serial port. UBX requires polling for information.

The link in my first reply contains an Arduino sketch that allows serial pass through to the GPS. You can then factory reset with U Center. This would test the theory that there is a GPS config issue and you could then implement a factory reset or re configuration within your software so it is not an issue in the future.

I’ve changed the sketch for the v07 version. I think this should work.

void setup() {
  Serial.begin(9600);
  Serial1.begin(9600, SERIAL_8N1, 12, 15, false, 1000);   //TBeam v07 GPS defaults
}

  void loop() {
  if (Serial.available()) {      // If anything comes in from the PC,
    Serial1.write(Serial.read());   // read it and send it out to the GPS.
  }

  if (Serial1.available()) {     // If anything comes in from the GPS,
    Serial.write(Serial1.read());   // read it and send it out to the PC.
  }
}
3 Likes

Thanks for your help @dafeman.

It’s already working. I did what you told me: I uploaded the “pass through” sketch and was able to access the GPS via UCenter.
In the menu Receiver-Action-Revert config the light came on. I immediately started receiving data from the GPS.

There is something in the Mestatic firm that leaves the GPS as if it is dead, but it is alive … hi hi.

Thanks once again.

3 Likes

these GPSes support two protocols NMEA and UBX. We tell the GPS to switch to UBX (and the GPS stores that setting in its battery backed up RAM) because UBX allows much lower power consumption.

4 Likes

Hello
I’ve modified a LilyGO sketch with SparkFun libraries to help you out to reset U-blox NEO GPS devices on TTGO T-beam T22- V1.0 and 1.1
This sketch will bring back U-blox GPS N6M & N8M factory settings so that NMEA 9600 over the GPS serial output is enabled.
You can download this sketch on my GitHub:


It worked fine for my 5 T-beams… good luck !
2 Likes

What board are you selecting in the Arduino IDE?

1 Like