Pixhawk 6X not recognizing GPS-RTK2-SMA, keeps showing "No GPS"

I have a pair of GPS-RTK2-SMA boards, and can reliably get them to output NMEA sentences from the USB port (I can receive and parse the lines on a Raspberry Pi)

But, when I connect the board to a Pixhawk (CUAV Pixhawk 6X, UART1 on RTK to GPS2 on Pixhawk), it keeps saying “No GPS”. I have already set the correct Baud rate (115200), protocol (I tried both UBX and NMEA) and port configuration (GPS).

Can anyone help?

What are your connections and what sparkfun part number gps are you using?

I am using the Sparkfun product number “GPS-16481”, or “SparkFun GPS-RTK-SMA Breakout - ZED-F9P (Qwiic)”

The I am using the GPS2 port (see the pinout of the Pixhawk), and the wire connections are listed below:

GPS2 -> UART1
-----------------------
5V   -> 5V;
TX   -> RX/MOSI;
RX   -> TX/MISO;
SCL  -- Not connected;
SDA  -- Not connected;
GND  -> GND.

The default baud for ZED-F9P would be 38400, you’d need to commit 0x40520001 / CFG-UART1-BAUDRATE to FLASH for it to be most sticky

Wiring looks correct

2 Likes

I have set the Baud rate to 115200 in Config/PRT/UART1 on the RTK, and in SERIAL4_BAUD on the Pixhawk. It still doesn’t connect.

Have you verified you’re actually getting valid data out of UART1 on the GPS? You might need to configure it in Ucenter.

Or explictly scope the pins, or with an analyzer or TX pin dumping into a USB-to-CMOS Serial RX pin for observational purposes.

Other than this you’ll have to dig into the PIXHAWK firmware, or debugging options.

I directly monitored the UART1 port with a usb-to-uart adapter and alligator clips and I got these three messages every second in the packet console:

07:20:09  R -> UBX NAV-PVT,  Size 100,  'Navigation PVT Solution'
07:20:09  R -> UBX NAV-STATUS,  Size  24,  'Navigation Status'
07:20:09  R -> UBX NAV-DOP,  Size  26,  'Dilution of Precision'

But, I still get “No GPS” on my Pixhawk. If anyone successfully connected RTKs to the Pixhawk, can you share what messages do you get? It will be a great guideline for what I should adjust.

If it helps, this is the raw message I get in the binary console:

07:24:25  0000  B5 62 01 07 5C 00 78 4E 7D 20 E9 07 01 04 07 18  µb..\.xN} é.....
          0010  19 37 15 00 00 00 AE E8 04 00 03 83 EA 1D 21 23  .7....®è....ê.!#
          0020  44 B7 EF B3 39 16 1C FA 00 00 BC 6F 01 00 0E 00  D·ï³9..ú..¼o....
          0030  00 00 0A 00 00 00 00 00 00 00 FC FF FF FF EC FF  ..........üÿÿÿìÿ
          0040  FF FF 04 00 00 00 00 00 00 00 76 00 00 00 80 A8  ÿÿ........v....¨
          0050  12 01 70 00 04 00 5C 41 4F 21 00 00 00 00 00 00  ..p...\AO!......
          0060  00 00 09 20                                      ... .
          
07:24:25  0000  B5 62 01 03 10 00 78 4E 7D 20 03 DF 03 88 4C 02  µb....xN} .ß..L.
          0010  00 00 BC D1 0B 00 CA 7B                          ..¼Ñ..Ê{.
          
07:24:25  0000  B5 62 01 04 12 00 78 4E 7D 20 82 00 70 00 41 00  µb....xN} ..p.A.
          0010  60 00 3A 00 2D 00 25 00 99 60                    `.:.-.%..`.

That doesn’t look right, you should be seeing something like the image below.


I think you may need to configure the GPS to output NMEA in Ucenter.

1 Like

I think the Flight Controller is using UBX packets, not NMEA, but not my area, and might be build/setting dependent.
The NAV-PVT is reporting RTK Fixed, with cm level accuracy estimates.

1 Like

I tried to adjust the settings to NMEA in u-center and I did, indeed, get valid NMEA messages. But, if I do that and set GPS2_TYPE to NMEA on my Pixhawk, I still get “No GPS,” which is no different from when both ends are set to UBX.

You might need a pixhawk forum for this, it’s probably something simple we’re all overlooking that someone more pixhawk oriented would spot.

You are testing everything with the GPS under open sky?

If the GPS isn’t receiving data from satellites, it won’t get a fix. I have seen other software report that as “no GPS” even though there was a GPS sending possibility invalid data because of no or a low quality fix.

29 Satellite Fixed RTK, looks pretty solid

---UBX-----------------------------------------------------------------------
01 07 NAV-PVT         - 09 20 : 09 20 100
TOW:545083.000321710  6 07:24:43.000
Valid Fix
Differential Corrections Applied
PSM is not active
RTK Fixed
LLH:   37.xxxxxxx -122.xxxxxxx   64.028   94.140  -30.112
ACC:  0.02  HACC:  0.01  VACC:  0.01  PDOP:  1.12  USED: 29
-----------------------------------------------------------------------------

I don’t have a working understanding of the PIXHAWK firmware, but would suspect its a port or source configuration setting. What are the expectations for the GPS1 input vs the one for GPS2?

https://ardupilot.org/copter/docs/common-gps-ardusimple.html

If you have any experiences, what do you usually need to match to connect a pair of ports together? I matched the wires (TX-RX), baud (I tried 9600 and 115200) and protocol (I tried UBX and NMEA), but I must be missing something.

Are you using (2) GPS devices on the PixHawk?

Warning: It is important that a GPS be connected to the first SERIALx port that has its SERIALx_PROTOCOL parameter set to “5” (GPS) since it will stop searching for GPS during bootup if not found on the first port configured for GPS protocol.

Interesting. I’ll check that nothing else is set to “5”. Thank you for the advice!

I connected the GPS to telem 1 port and set serial1_protocol to 5. I then set every other serial port to something else. Unfortunately, I still don’t see a

Isn’t Serial1 TELEM1?
Serial2 TELEM2, Serial3 GPS1, Serial4 GPS2?

Edit: Nevermind, I see you used TELEM1, do you have any other PIXHAWK using more generic GPS/GNSS successfully?

Yes. On the very same Pixhawk I got a DroneCAN GPS module to work out of the box. It is usually connected to the CAN1 port, though I disconnected this GPS during testing in case it interferes with the RTK.

What is GPS_TYPE / GPS_TYPE2 set too?
0=None
1=Auto
2=uBlox
9=UAVCAN