Hi community folks,
This is a short article about my successful setup of RTK/GNSS Rover using Raspberry Pi with Mosaic-x5 HAT and Waveshare SIM7670g HAT and a PointOneNav caster.
Some of you might have seen my topics asking for help with my setup in the Raspberry Pi and GNSS Development board forums. This is the successful completion of that setup, so no more annoyingly long posts about it again!
Introduction
I set out to create a GNSS/RTK rover and decided through various trials and errors, to settle on the a Raspberry Pi stack with the Sparkfun Mosaic-x5 HAT and a Waveshare SIM7670g LTE Cat-1/GNSS HAT that uses a PointOneNav NTRIP caster for RTK positioning. I wanted it to be robust, such that when I am away from a WiFi network, it should reliably boot up with Mosaic connected to the NTRIP caster using the cellular network. It should fo that even after devices are power-cycled, USB cables are connected to different physical ports on the RPi and in any order. Here’s a brief explanation on how I did it, what went wrong, and what to watch out for.
System Goals
- Mosaic-X5 HAT gets a static IP from the Pi, so its Web UI is always reachable.
- The Pi can route RTK corrections from the internet (NTRIP caster) to the Mosaic, even after reboots.
- Waveshare SIM7670G Cellular HAT provides fallback internet (PPP), so you’re not stuck if WiFi goes down. I use the cellular network exclusively with my WiFi turned off at home, so that I can test it reliably.
- Everything recovers automatically after power loss or hardware swaps.
Hardware Used
- Raspberry Pi 4B/5
- SparkFun Septentrio Mosaic-X5 HAT
- Waveshare SIM7670G USB Modem HAT
- GNSS antenna, SIM card (with data), SD card with Raspberry Pi OS
Network Overview
Internet (NTRIP Caster)
|
[SIM7670G PPP] or [WiFi] (on Pi)
|
Raspberry Pi (DHCP, NAT, DNS)
|
[usb0: Mosaic-X5 HAT, static 192.168.3.1]
- Pi runs DHCP/DNS/NAT for Mosaic.
- Mosaic gets static IP, routes all traffic via Pi.
- Pi routes Mosaic traffic out via WiFi or PPP, handles DNS and NAT.
Configuration and Scripts
You can find all my configuration files, systemd services, and helper scripts in this open-source repository:
GitHub: RaspberryPiGNSSWithCellular_Rover
Key Setup Highlights
1. Static IP for Mosaic via Dnsmasq
- Assigns Mosaic-X5 a fixed IP and directs DNS/gateway to Pi.
- Ensures the Mosaic always gets the right address even after reboots.
2. Local DNS Resolver (Unbound)
- Pi resolves DNS for Mosaic and itself, even as the upstream network changes.
- Critical for reliable NTRIP caster hostname resolution.
3. Firewall/NAT with nftables
- Forwards Mosaic traffic out over WiFi or PPP, keeps things secure.
- Ensures only required ports and interfaces are accessible.
4. Systemd Automation
- All networking and device scripts are tied into systemd with dependencies, so they launch and recover in the correct order, every time.
Troubleshooting and Lessons Learned
Problems Solved:
- Mosaic stuck at “Acquiring IP” ➔ Fixed with proper static DHCP.
- DNS failures after network switch ➔ Solved with Unbound local DNS caching.
- Networking failures after hardware swap or reboot ➔ Handled with persistent USB net rules and robust systemd orderings.
Key Takeaways:
- Start with static, predictable IP assignments.
- Use a local DNS cache/forwarder (Unbound).
- Automate recovery with systemd and udev rules.
- Log everything for troubleshooting.
Next Steps
- Add a small low-power display to show system status as it comes up and is ready. Also display RTK/GNSS coords as it is moved around as a rover.
- Create a fun container for the stack and future modifications.
- Better cable management!
Full Project Resources
Download from GitHub:
- All configs and scripts (dnsmasq, unbound, nftables, PPP, systemd, shell)
- README with wiring, troubleshooting, and setup instructions
- Issues welcome!
- At present this is a read-only repo.
Conclusion
With careful configuration of DHCP, DNS, NAT, and systemd, you can make a SparkFun Mosaic-X5 GNSS rover “just work” on a Raspberry Pi—even after hardware swaps and power cycles. It’s a fantastic platform for GNSS, RTK, and robotics projects.
**Questions or suggestions? Reply here or open an issue on Github!
Cheers!
(Atin Kothari / atin4210)