# Polling a GPS module

**URL:** <https://community.sparkfun.com/t/polling-a-gps-module/62983>\
**Category:** GPS/GNSS\
**Created:** [January 23, 2025, 10:30pm UTC](https://community.sparkfun.com/t/polling-a-gps-module/62983 "2025-01-23T22:30:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ezflyr](https://avatars.discourse-cdn.com/v4/letter/e/2bfe46/32.png) [@ezflyr](https://community.sparkfun.com/u/ezflyr)\
**Post date:** [January 23, 2025, 10:30pm UTC](https://community.sparkfun.com/t/polling-a-gps-module/62983/1 "2025-01-23T22:30:11Z")

</div>

Hi All,

I’m looking for a GPS module that can be ‘polled’ to transmit specific NMEA messages (I need the GPRMC message). I’m currently using the EM-406 module, and I can turn off continuous transmit of the GPRMC message, and only request this message by polling when needed.

Does anyone know a currently available GPS module that will allow this?

Thanks,

John

---

<div class="post-metadata">

**Author:** ![TS-Russell](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/ts-russell/32/6092_2.png) [@TS-Russell](https://community.sparkfun.com/u/TS-Russell)\
**Post date:** [January 24, 2025, 12:17am UTC](https://community.sparkfun.com/t/polling-a-gps-module/62983/2 "2025-01-24T00:17:49Z")

</div>

Our GNSS libraries have examples for exactly this; I would generally recommend the [SparkFun GPS-RTK-SMA Breakout - ZED-F9P (Qwiic)](https://www.sparkfun.com/sparkfun-gps-rtk-sma-breakout-zed-f9p-qwiic.html) as a great all-round module

For modules like the F9 and M10, we recommend upgrading to [Version 3](https://github.com/sparkfun/SparkFun_u-blox_GNSS_v3). However, older modules like the M8 do not support the Configuration Interface. For those you will need to keep using [Version 2](https://github.com/sparkfun/SparkFun_u-blox_GNSS_Arduino_Library) of the library. We will continue to support both.

---

<div class="post-metadata">

**Author:** ![PaulZC](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/paulzc/32/67_2.png) [@PaulZC](https://community.sparkfun.com/u/PaulZC)\
**Post date:** [January 24, 2025, 12:55pm UTC](https://community.sparkfun.com/t/polling-a-gps-module/62983/3 "2025-01-24T12:55:24Z")

</div>

Hi John (@ezflyr ),

With the u-blox modules, by default, the standard NMEA messages (GGA, GLL, GSA, GSV, RMC, VTG) are enabled on both I2C and UART1 at the navigation rate (default 1Hz). You can set the rate of these to zero and then poll individual messages as needed. Example below. You need to be a little careful about Talker IDs (GPRMC vs GNRMC), and you need to calculate the checksum, but it is straightforward.

The ZED-F9P is a great dual-band RTK-capable module. But the single-band non-RTK SAM-M8, SAM-M10 and MAX-M10 can all be configured in the same way. The SAM modules have built-in antennas.

I hope this helps,  
Paul

 ![image](https://canada1.discourse-cdn.com/sparkfun/original/2X/6/61552787a65ff738765d74b2bbdc7b9033e10ac2.png)

---

<div class="post-metadata">

**Author:** ![ezflyr](https://avatars.discourse-cdn.com/v4/letter/e/2bfe46/32.png) [@ezflyr](https://community.sparkfun.com/u/ezflyr)\
**Post date:** [January 27, 2025, 5:30pm UTC](https://community.sparkfun.com/t/polling-a-gps-module/62983/4 "2025-01-27T17:30:16Z")

</div>

Hello Guys,

Thanks! That is exactly the information I need! BTW, this is a lighting controller project that will reside in a fixed location. The GPS is required once to determine the Lat./Long. for sunset/sunrise calculations, and then periodically to update the onboard RTC with the current time. I’ve got the M10S breakout and an antenna on order to perform some testing!

Thanks,

John

---

<div class="post-metadata">

**Author:** ![PaulZC](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/paulzc/32/67_2.png) [@PaulZC](https://community.sparkfun.com/u/PaulZC)\
**Post date:** [February 7, 2025, 1:01pm UTC](https://community.sparkfun.com/t/polling-a-gps-module/62983/5 "2025-02-07T13:01:42Z")

</div>

Hi John (@ezflyr ),

When the time comes, you might find this post useful:

> [@NEMA input commands](https://community.sparkfun.com/t/nema-input-commands/63238/2):
>
> Hi @rgsparber , Please tell us which M10 document you are looking at. I couldn’t find Table 2-4 that you mentioned. Please also tell us which Pro Micro board you are using. There are several. Most are 3.3V, but some older ones are 5V. Please be careful. The u-blox MAX-M10S is 3.3V. You may hit problems if you are using a 5V Pro Micro. I’ve put together a generic NMEA polling example (see below). It will set the rate of the standard NMEA messages to zero, using the UBX VALSET configuration interface. Then it polls GNGGA using the xxGNQ message. All of the bits you need are in there; there is code to calculate both the UBX and NMEA checksums (they are different). I hope this helps, Paul // Communicate with the u-blox MAX-M10S over Serial (UART) // Set the rate of the standard NMEA messages to zero // Poll individual NMEA messages #define myConsole Serial // Change to e.g. SerialUSB if needed #define mySerial Serial1 // Change this if needed void ubxWriteByteUpdateChecksum(uint8\_t…

I hope this helps,  
Paul
