ublox zed f9p docs zephyr driver research
Source
- Type:
local-file
- Path:
/home/tyler/.openclaw/workspace/ublox_zed_f9p_docs_zephyr_driver_research.md
- Bytes: 5216
- Updated: 2026-08-09T05:24:26.729Z
Content
# u-blox ZED-F9P Docs, Setup, and Zephyr RTOS Driver
*Generated: 2026-08-08*
## 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 covers where the docs live, how to set the module up and read data from it, and whether a Zephyr RTOS driver already exists.
## 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 (SparkFun sells a ground plate) — 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 you still get 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: module speaks 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 via 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 that handles survey-in and streams RTCM3 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. There's also a companion UBX M10 driver (PR #110846, merged mid-2026) if the team ever evaluates cheaper single-band u-blox modules (e.g. M10Q) instead.
## Sources
1. SparkFun GPS-RTK2 Hookup Guide — https://learn.sparkfun.com/tutorials/gps-rtk2-hookup-guide/all
2. u-blox ZED-F9P Integration Manual (UBX-18010802) — https://content.u-blox.com/sites/default/files/ZED-F9P_IntegrationManual_UBX-18010802.pdf
3. u-blox ZED-F9P-05B Datasheet — https://content.u-blox.com/sites/default/files/documents/ZED-F9P-05B_DataSheet_UBXDOC-963802114-12824.pdf
4. SparkFun u-blox GNSS Arduino Library — https://github.com/sparkfun/SparkFun_u-blox_GNSS_Arduino_Library
5. Zephyr GNSS U-blox F9P driver source — https://github.com/zephyrproject-rtos/zephyr/blob/main/drivers/gnss/u_blox/gnss_u_blox_f9p.c
6. Zephyr devicetree binding docs (u-blox,f9p) — https://docs.zephyrproject.org/latest/build/dts/api/bindings/gnss/u-blox%2Cf9p.html
7. Zephyr GNSS Add UBX F9P driver PR #90027 — https://github.com/zephyrproject-rtos/zephyr/pull/90027
8. Zephyr GNSS sample README (RTK base station script) — https://docs.zephyrproject.org/latest/samples/drivers/gnss/README.html
9. Zephyr GNSS Add UBX M10 driver PR #110846 — https://github.com/zephyrproject-rtos/zephyr/pull/110846
## Methodology
Web search + direct read of SparkFun/u-blox/Zephyr official documentation and GitHub source/PRs on 2026-08-08.
Notes
Referenced By