Skip to content

u-blox ZED-F9P Docs, Setup, and Zephyr RTOS Driver

Notes

Summary

Context

Saddleback College Robotics' rover team uses the SparkFun GPS-RTK-SMA Breakout (u-blox ZED-F9P) — 2x purchased in the 2024-25 season, ~$250/unit, for centimeter-level RTK GNSS positioning. This page covers where the docs live, how to set the module up and read data from it, and whether a Zephyr RTOS driver already exists (relevant if the rover's firmware runs on Zephyr).

Documentation

  • Hookup Guide: https://learn.sparkfun.com/tutorials/gps-rtk2-hookup-guide/all
  • u-blox ZED-F9P Integration Manual: https://content.u-blox.com/sites/default/files/ZED-F9P_IntegrationManual_UBX-18010802.pdf
  • UBX & NMEA Protocol/Interface description: linked from SparkFun's product page "Helpful Documentation" section: https://www.sparkfun.com/sparkfun-gps-rtk-sma-breakout-zed-f9p-qwiic.html
  • Datasheet: https://content.u-blox.com/sites/default/files/documents/ZED-F9P-05B_DataSheet_UBXDOC-963802114-12824.pdf
  • SparkFun Arduino Library: https://github.com/sparkfun/SparkFun_u-blox_GNSS_Arduino_Library

Setup summary

  1. Connect via I2C (Qwiic, default) or USB-C for bench testing. UART/SPI also supported (DSEL jumper: open = I2C, closed = SPI).
  2. Attach a GNSS antenna via SMA with clear sky view + metal ground plane — no indoor testing.
  3. Use u-center (free u-blox Windows tool) over USB to confirm live position/fix status before writing code.
  4. For RTK cm-accuracy, feed RTCM correction data in (UART2/I2C/USB) — either a second ZED-F9P as a base station (survey-in mode) or an NTRIP service (e.g. free UNAVCO account). Without corrections, still a normal ~1.5-2.5m fix.

Reading data

  • Manual: u-center shows live NMEA/UBX stream, no code needed.
  • Arduino: SparkFun u-blox GNSS Arduino Library — myGNSS.getLatitude()/getLongitude()/getAltitude()/getFixType() over I2C (addr 0x42 default).
  • Python/ROS: standard NMEA + UBX over serial/I2C — any NMEA parser (pynmea2) or ublox_gps ROS2 driver works.

Zephyr RTOS driver — confirmed to exist

Zephyr mainline has a proper native driver for the F9P, not a generic NMEA hack: - Driver: drivers/gnss/u_blox/gnss_u_blox_f9p.c — https://github.com/zephyrproject-rtos/zephyr/blob/main/drivers/gnss/u_blox/gnss_u_blox_f9p.c (merged June 2025, PR #90027) - Devicetree binding: u-blox,f9p (UART) — https://docs.zephyrproject.org/latest/build/dts/api/bindings/gnss/u-blox%2Cf9p.html — props: initial-baudrate, fix-rate (ms, min 50), optional reset-gpios - Built on Zephyr's GNSS subsystem + modem_ubx interface — speaks native UBX protocol, exposes structured data through the standard gnss device API (gnss_set_fix_rate(), gnss_set_navigation_mode(), gnss_set_enabled_systems()), not string-parsing. - RTK support built in: CONFIG_GNSS_U_BLOX_F9P_RTK Kconfig option, with a callback for injecting RTCM correction data directly into the driver. - Reference sample with RTK base-station script: https://docs.zephyrproject.org/latest/samples/drivers/gnss/README.html — documents "F9P as rover + second F9P as base station" as first-class, including a base_station_f9p.py script handling survey-in and RTCM3 streaming to the rover.

Usage sketch

  1. Devicetree node with compatible = "u-blox,f9p" on the UART, set initial-baudrate/fix-rate.
  2. Enable CONFIG_GNSS + CONFIG_GNSS_U_BLOX_F9P (+ _RTK for corrections) in prj.conf.
  3. Use the standard gnss sample/driver API to read position/fix/satellite data — hardware-agnostic within Zephyr's GNSS abstraction.
  4. For RTK, run the base-station Python script on a second F9P, pipe RTCM3 to the rover device.

Caveat: the driver only merged into Zephyr mid-2025 — needs a recent Zephyr checkout/revision bump if the team is pinned to an older version. A companion UBX M10 driver also exists (PR #110846, merged mid-2026) if the team ever evaluates cheaper single-band u-blox modules (e.g. M10Q) instead.

Sources

Referenced By