Comments on: ESP32 with NEO-M8N GPS Module: GPS Logger and Display on Google Earth https://randomnerdtutorials.com/esp32-neo-m8n-gps-logger-google-earth/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Fri, 17 Oct 2025 04:10:26 +0000 hourly 1 https://wordpress.org/?v=6.8.5 By: Alan H https://randomnerdtutorials.com/esp32-neo-m8n-gps-logger-google-earth/#comment-1110506 Fri, 17 Oct 2025 04:10:26 +0000 https://randomnerdtutorials.com/?p=166652#comment-1110506 In reply to Ricard Semis.

Ricard,
If you haven’t discovered how to do this, here are some code segments that I use during the setup of the GPS module (NEO-6M).
I haven’t used commands for 2 or 3 Hz but I have used 1, 5, 10 Hz.

To set the sample frequency:
const unsigned char UBLOX_rate[] PROGMEM = {
//Uncomment the desired Rate from the list below, (only one).
//0xB5, 0x62, 0x06, 0x08, 0x06, 0x00, 0x64, 0x00, 0x01, 0x00, 0x01, 0x00, 0x7A, 0x12, //(10Hz)
//0xB5, 0x62, 0x06, 0x08, 0x06, 0x00, 0xC8, 0x00, 0x01, 0x00, 0x01, 0x00, 0xDE, 0x6A, //(5Hz)
//0xB5, 0x62, 0x06, 0x08, 0x06, 0x00, 0xE8, 0x03, 0x01, 0x00, 0x01, 0x00, 0x01, 0x39, //(1Hz)
};

// Set GPS sample rate.
for (unsigned int i = 0; i < sizeof(UBLOX_rate); i++) {
gpsSerial.write(pgm_read_byte(UBLOX_rate + i));
}

Changing the sample frequency increases the volume of data coming from the GPS module and this will likely exceed the bandwidth of the 9600 baud link and you will lose data.

This can be addressed in two ways: (By default I do both.)

Decrease the volume of data each sample period by disabling NEMA sentences that you don’t need. I don’t know if TinyGPS supports this, I generally use NeoGPS which does support this.

const unsigned char UBLOX_INIT[] PROGMEM = {

// Disable NMEA sentences
// Uncomment sentences that are not required for the GPS info that you want
//0xB5, 0x62, 0x06, 0x01, 0x08, 0x00, 0xF0, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x40, // GxRMC off
//0xB5, 0x62, 0x06, 0x01, 0x08, 0x00, 0xF0, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x05, 0x47, // GxVTG off
//0xB5, 0x62, 0x06, 0x01, 0x08, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x24, // GxGGA off
//0xB5, 0x62, 0x06, 0x01, 0x08, 0x00, 0xF0, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x32, // GxGSA off
//0xB5, 0x62, 0x06, 0x01, 0x08, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x39, // GxGSV off
//0xB5, 0x62, 0x06, 0x01, 0x08, 0x00, 0xF0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x2B, // GxGLL off
//0xB5, 0x62, 0x06, 0x01, 0x08, 0x00, 0xF0, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x5B, // GxZDA off

};

for (unsigned int i = 0; i < sizeof(UBLOX_INIT); i++) {
gpsSerial.write(pgm_read_byte(UBLOX_INIT + i));
}
Increase the baud rate to the GPS module. I have found 115200 to be reliable in all my projects.

// Change GPS baud rate to 115200
const unsigned char Baud_115200[] PROGMEM = {
0xB5, 0x62, 0x06, 0x00, 0x14, 0x00, 0x01, 0x00, 0x00, 0x00, 0xD0, 0x08, 0x00, 0x00, 0x00, 0xC2, 0x01, 0x00, 0x07, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x7E,
};

for (unsigned int i = 0; i < sizeof(Baud_115200); i++) {
gpsSerial.write(pgm_read_byte(Baud_115200 + i));
}

// Now restart the GPS module interface at the new baud rate
gpsSerial.flush();
delay(250);
gpsSerial.begin(115200, SERIAL_8N1, RXD2, TXD2); //Restart GPS port at 115200 baud
delay(250);

These settings are not saved in the GPS module and will revert to default on a power cycle.
I hope you find this of some help.
Alan.

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-neo-m8n-gps-logger-google-earth/#comment-1085150 Sat, 23 Aug 2025 17:20:07 +0000 https://randomnerdtutorials.com/?p=166652#comment-1085150 In reply to Ian.

Yes.

]]>
By: Ian https://randomnerdtutorials.com/esp32-neo-m8n-gps-logger-google-earth/#comment-1084919 Sat, 23 Aug 2025 01:14:59 +0000 https://randomnerdtutorials.com/?p=166652#comment-1084919 Hi sara! I would like to know if how is it possible to track a person using esp32 and Neom8n on a mobile application? Is it possible?

]]>
By: Ricard Semis https://randomnerdtutorials.com/esp32-neo-m8n-gps-logger-google-earth/#comment-1032088 Tue, 29 Apr 2025 06:10:55 +0000 https://randomnerdtutorials.com/?p=166652#comment-1032088 Hello.
First of all, thank you for the excellent tutorials, especially the use of ESP NOW.
Regarding the use of GPS, both with the NEO-M8n and the NEO-6M, I would like to know how to change the data acquisition speed.
I have reviewed the information available online, and also with little success from UBLOX. It should be noted that I work with Apple for this last one, and UBLOX does not offer any guidance in this case.
The model is a NEO-6M at 1 Hz, and I would like to change to 2 Hz or 3 Hz, although I believe the procedure will be common.
I use the “Arduino ID.”
I would appreciate help on this issue, or to know where I can find it.
Thank you very much from Barcelona.

]]>
By: Markku https://randomnerdtutorials.com/esp32-neo-m8n-gps-logger-google-earth/#comment-1030369 Thu, 24 Apr 2025 11:47:13 +0000 https://randomnerdtutorials.com/?p=166652#comment-1030369 One big problem with these “u-blox” modules is that too many sellers are offering counterfeit products. I had one of those (very much like the one in the photo) and it turned out to be a counterfeit one. Just google for “counterfeit u-blox gps modules” to get more info. The modules may work to a point but their GPS reception may be worse and they may have a different/older firmware, for instance.

Here is one link (if they are accepted here):

portal.u-blox.com/s/question/0D52p00008HKEEECA5/psa-fake-ublox-modules-and-potential-ways-to-identify-them

]]>
By: Rodrigo https://randomnerdtutorials.com/esp32-neo-m8n-gps-logger-google-earth/#comment-1026759 Mon, 14 Apr 2025 01:37:23 +0000 https://randomnerdtutorials.com/?p=166652#comment-1026759 I made a similar one, but with Micro python, writing directly on Esp32 flash. Now I can improve it with your .KML template.

Thank you!

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-neo-m8n-gps-logger-google-earth/#comment-1026204 Sat, 12 Apr 2025 16:15:14 +0000 https://randomnerdtutorials.com/?p=166652#comment-1026204 In reply to Luigi Louback.

Olá.
Uso o fritzing.
Cumprimentos,
Sara

]]>
By: Luigi Louback https://randomnerdtutorials.com/esp32-neo-m8n-gps-logger-google-earth/#comment-1026201 Sat, 12 Apr 2025 15:49:07 +0000 https://randomnerdtutorials.com/?p=166652#comment-1026201 Qual simulador você utiliza para essas imagens?
Obrigado, excelente conteúdo!

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-neo-m8n-gps-logger-google-earth/#comment-1026123 Sat, 12 Apr 2025 10:26:47 +0000 https://randomnerdtutorials.com/?p=166652#comment-1026123 In reply to Renzo.

Hi.
That’s a very interesting project and quite complicated.
I’m not sure if that’s possible to do with this kind of display and with the ESP32.
Maybe there are lightweight libraries to draw a map, but I’m not familiar with it at the moment.
Regards
Sara

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-neo-m8n-gps-logger-google-earth/#comment-1026109 Sat, 12 Apr 2025 09:43:44 +0000 https://randomnerdtutorials.com/?p=166652#comment-1026109 In reply to Dan.

Hi.
Has long as the antenna as an ipex connector (to uFL) or ipex adapter to UFL to connect to the board, you don’t need to solder.
Make sure it works in the range of 3 to 5V.
You can get a ufl to ipx connector separately if needed.
You can search on an online store for “external antenna gps ipex”
Regards,
Sara

]]>