Single serial GPS on GPS-2 port - how to set parameters properly

My current project has a Holybro Pixhawk 6C Mini flight controller, and a Mateksys M9N GNSS receiver.

I’m connecting the M9N receiver to the GPS-2 port (Serial 4) because it has the smaller connector without the leads for the safety switch or LED’s.

I’m finding that to make it work, I have to set both GPS_TYPE and GPS_TYPE2 to “1” for auto. If I set either of them to “0” for disable, the GPS doesn’t appear to report data.

And if I set the GPS_TYPE to the value for “UBLOX” then ArduPilot doesn’t seem to see the GPS either.

Interestingly - with both GPS_TYPE and GPS_TYPE2 set to “1” for auto, the HUD shows “NO GPS” but then shows the fix level. (3D DGPS in this example) Maybe this is a Mission Planner issue.

Also - displaying the HUD’s user items for SATCOUNT and SATCOUNT2, and GPSHDOP and GPSHDOP2 - it appears that the GPS receiver is identified as “number 2.”

I saw in the comments of some of these parameters that the next firmware release will rename some of these parameters.

In the mean time - I’d like to make sure I’ve got this thing configured properly.

Thank you!

Set:

SERIAL3_PROTOCOL to -1 (None)
SERIAL4_PROTOCOL to 5 (GPS)
GPS_TYPE to 1 (Auto)
GPS_TYPE2 to 0

The port labels are misleading, and I wish manufacturers would just label them as UART or SERIAL.

The upcoming name changes are mostly aesthetic and won’t change the basics:

If you only have one GPS, it’s GPS1 (or instance 0 in the logs). Even if it’s connected to a port labeled GPS69!

Same goes for most any peripheral.

2 Likes

Thank you - that’s exactly what I needed to know. Works like a charm!