DEMO: Pixhawk-4 GPS Module with Zephyr
Introduction
This tutorial describes how to operate the Pixhawk-4 GPS Module (Ublox M8N) with Zephyr on FMURT6 board.
Items Needed
USB-C to USB-A Cable
2
Micro-USB to USB-A Cable
1
Hardware Procedure


Zephyr Software Procedure
Initialize west workspace and checkout branch
Building and Flashing
Error Handling
if you get the following error (or similar): "fatal error: command exited with status 1: /opt/segger/jlink_v788a/jlinkexe -nogui 1 -if swd -speed auto -device 'mimxrt1062xxx6a?bankaddr=0x60000000&loader=hyperflash' -commanderscript /tmp/tmpgcx4mnhnjlink/runner.jlink -nogui 1", then simply run west flash again. Or unplug the board, then re-plug it. And then flash again.
if you get the following error: "fatal error: required program jlinkexe not found; install it or add its location to path", then download and install jlink from here, and add its folder to the path using the following command: set PATH=%PATH%;<path to Jlink.exe>
Note: this command only modifies the PATH variable for the current session.
Running and Demonstration
Key Notes
If any configuration API returns NACK (which can be seen from the debug logs), then it's recommended to run the application again.
The reception of GPS data from the Pixhawk-4 GPS Module depends on the location of operation. According to our testing, this module doesn't work indoors, but only outdoors, or rooms with at least one open window.
We may need to wait 3-5 minutes before our GPS module is able to receive data. As shown in 'Logs From Testing on GPS Module 2 (Success)', the module first senses the data on the 280th function call, but after that returns the correct data consistently. According to our observations, the 'GPS Fix' Indicator LED will start blinking when GPS signals are available.
Logs
Last updated
Was this helpful?