Title: NEO-M8 Not Working at 9600 Baud Rate

Hi everyone,

I’m using a NEO-M8 GPS module with my Arduino. I want to set the baud rate to 9600, but it’s not working. When I use a higher baud rate (like 38400 or 115200), it works fine, but at 9600 I don’t receive any data.

Has anyone faced this issue or knows how to make the NEO-M8 work properly at 9600 baud?

I'm reasonably sure that those that might be able to help will ask you to tell them which board you're using, ask for a wiring diagram and the code.

Esp32-s3 with NEO-M8

Check the size of data received and the bandwidth.

The datasheet states:

If the amount of data configured is too much for a certain port's bandwidth (e.g. all UBX messages output on a UART port with a baud rate of 9600), the buffer will fill up. Once the buffer space is exceeded, new messages to be sent will be dropped.
To prevent message losses, the baud rate and communication speed or the number of enabled messages should be selected so that the expected number of bytes can be transmitted in less than one second.

Subject:** NEO-M8N GPS not saving baud rate permanently

Hello everyone,

I’m using an ESP32 with a NEO-M8N GPS module, and I’m trying to change the GPS baud rate from 115200 to 9600 permanently using UBX configuration commands.

Here’s the first code I upload to set and save the new baud rate:

#include <TinyGPSPlus.h>
#include <HardwareSerial.h>

TinyGPSPlus gps;

#define RXD2 16
#define TXD2 17

// UBX command to set UART1 baud to 9600
const uint8_t setBaud9600[] = {
  0xB5, 0x62, 0x06, 0x00, 0x14, 0x00,
  0x01, 0x00, 0x00, 0x00,
  0xD0, 0x08, 0x00, 0x00,
  0x80, 0x25, 0x00, 0x00, // 9600 baud
  0x07, 0x00,
  0x03, 0x00,
  0x00, 0x00,
  0x00, 0x00,
  0xA2, 0xB5
};

// UBX command to save configuration (Flash + BBR)
const uint8_t saveCfg[] = {
  0xB5, 0x62, 0x06, 0x09, 0x0D, 0x00,
  0x00, 0x00, 0x00, 0x00,
  0xFF, 0xFF, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00,
  0x17,
  0x31, 0xBE
};

void setup() {
  Serial.begin(115200);
  Serial1.begin(115200, SERIAL_8N1, RXD2, TXD2);
  Serial.println("Setting GPS baud rate to 9600...");

  delay(2000);
  Serial1.write(setBaud9600, sizeof(setBaud9600));
  Serial1.flush();
  Serial.println("Command sent. Waiting for GPS to switch...");

  delay(2000); // Allow GPS to apply new baud rate

  Serial1.end(); // Close old UART
  Serial1.begin(9600, SERIAL_8N1, RXD2, TXD2);
  Serial.println("Reconnected at 9600 baud.");

  Serial1.write(saveCfg, sizeof(saveCfg));
  Serial1.flush();
  Serial.println("Configuration saved to flash.");

  delay(1000);
  Serial.println("NEO-M8N GPS configured to 9600 baud permanently.");
}

void loop() {
  while (Serial1.available() > 0) {
    char c = Serial1.read();
    gps.encode(c);

    if (gps.location.isUpdated()) {
      Serial.print("Latitude: ");
      Serial.println(gps.location.lat(), 6);
      Serial.print("Longitude: ");
      Serial.println(gps.location.lng(), 6);
      Serial.print("Satellites: ");
      Serial.println(gps.satellites.value());
      Serial.print("Altitude (m): ");
      Serial.println(gps.altitude.meters());
      Serial.print("Speed (km/h): ");
      Serial.println(gps.speed.kmph());
      Serial.println("---------------------");
    }
  }
}

After running this code, I then upload the following sketch to test communication at 9600 baud:

#include <TinyGPSPlus.h>
#include <HardwareSerial.h>

TinyGPSPlus gps;
#define RXD2 16
#define TXD2 17

void setup() {
  Serial.begin(115200);
  Serial1.begin(9600, SERIAL_8N1, RXD2, TXD2); // GPS now fixed at 9600
  Serial.println("NEO-M8N GPS started at 9600 baud");
}

void loop() {
  while (Serial1.available() > 0) {
    char c = Serial1.read();
    gps.encode(c);

    if (gps.location.isUpdated()) {
      Serial.print("Latitude: ");
      Serial.println(gps.location.lat(), 6);
      Serial.print("Longitude: ");
      Serial.println(gps.location.lng(), 6);
      Serial.print("Satellites: ");
      Serial.println(gps.satellites.value());
      Serial.print("Altitude (m): ");
      Serial.println(gps.altitude.meters());
      Serial.print("Speed (km/h): ");
      Serial.println(gps.speed.kmph());
      Serial.println("---------------------");
    }
  }
}

However, the GPS module only works after resetting — it doesn’t seem to save the new baud rate permanently.
Each time I power-cycle or reset the GPS, it returns to the default baud rate (115200).

Could someone please help me understand why the configuration is not being saved permanently, or if I’m missing any additional UBX commands or steps?

Thank you!

You should provide a link or a picture of the actual GPS module you are using.

Esp32-s3 with NEO-M8 TinyGPS Module

Best to use the U-Blox U-Center program to set and save parameters. That way you have full control over the device, with comprehensive error checking.

Can you please post a copy of your circuit, a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, power supplies, component names and pin labels.

Can you please post a link to the GPS datasheet?

Thanks... Tom.... :smiley: :+1: :coffee: :australia:

Please explain why don't you want to use the default baudrate (115200) ?


this is GPS module data sheet
NEO-M8-FW3_DataSheet_UBX-15031086.pdf (1.1 MB)

Default baud rate is 9600, but I can’t receive any data using this baud rate

How to use U-Blox U-center can you please explain step by step

Didn't you wrote (in post #5) that default baudrare is 115200?

The question remains the same - why don't you want to use a 115200 ?

Some tips on using U-center here;

Best to just download it and give it a try …….