Example15_GNSS_NTRIP_Caster_With_Callbacks

# Example15_GNSS_NTRIP_Caster_With_Callbacks

ESP-IDF version of the Arduino example [Example15_GNSS_NTRIP_Caster_With_Callbacks.ino](../../examples/Example15_GNSS_NTRIP_Caster_With_Callbacks/Example15_GNSS_NTRIP_Caster_With_Callbacks.ino).

This example connects to an NTRIP caster via TCP (using the Iridium 9604 LTE-M connection) and pushes the
RTCM correction data to an external u-blox RTK GNSS module (e.g. ZED-F9P) connected via I2C - using the
SparkFun u-blox GNSS v4 library. It uses the socket read callback, and GNSS callbacks for GGA and PVT.
This example uses LTE Cat M1. It selects the LTE Cat M1 RAT (setRAT) if required.

**Why an external GNSS?** The u-blox M10 GNSS built-in to the Iridium 9604 cannot use RTK corrections: its firmware does
not support RTCM, and it is a single-band (L1) receiver. AT+UGUBX can pass UBX messages to it, but not RTCM.
So the RTCM data is pushed to an external RTK GNSS (e.g. ZED-F9P) using the SparkFun u-blox GNSS v4 library.

## Hardware

* An ESP32 (or other ESP-IDF target) connected to the Iridium 9604 via a UART
* Connect: ESP32 TX to 9604 RXD; ESP32 RX to 9604 TXD; GND to GND
* Optionally connect RTS / CTS (hardware flow control) and PWR_ON
* An external u-blox RTK GNSS module (e.g. ZED-F9P) connected via I2C (Qwiic)

## Building

```
idf.py set-target esp32
idf.py menuconfig      # "Example Configuration": UART port, baud rate and GPIO pins; set the NTRIP caster details and the I2C pins
idf.py -p PORT flash monitor
```

`main/idf_component.yml` points at the library in this repository (`override_path: "../../../"`).

To create a project from this example, run:

idf.py create-project-from-example "sparkfun/sparkfun_iridium_9604_library=1.0.0:Example15_GNSS_NTRIP_Caster_With_Callbacks"

or download archive (~10.38 KB)