Need help on installing Holybro Micro M8N GPS on Pixhawk 1

Did anyone install Holybro Micro M8N GPS on Pixhawk 1? I am installing a Holybro Micro M8N GPS on an old Pixhawk 1 controller. The GPS is flashing Blue. I believe it finds satellites. However, QGC displays satellite count 0. Changing Flight Mode to POSCTL will automatically downgrade to ATLCTL. Does anyone know what the problem is?

Firmware on Pixhawk: PX4 1.9.0 beta
QGC version: 3.5.0

Holybro Micro M8N GPS has 6 pin PIXFALCON compatible cable. To plug to Pixhawk GPS port, I changed one end of the cable to DF13 connector. The pin connection is
Micro M8N GPS 5V <-------------------> Pixhawk GPS port pin 1 (VCC)
Micro M8N GPS RXD <----------------> Pixhawk GPS port pin 2 (TX)
Micro M8N GPS TXD <----------------> Pixhawk GPS port pin 3 (RX)
Micro M8N GPS GND <---------------> Pixhawk GPS port pin 6 (GND)

I have not connected SDA and SCL to Pixhawk I2C port yet.

This looks correct. One thing you can always try is to swap Rx and Tx in case that’s swapped.

Thanks JulianOes. I did swap Rx and Tx. That didn’t work either. I also tried to use Telem2 and Serial 4 port as the primary GPS port and changed their baud rate to be Auto. That didn’t work.

1 Like

And your pinout of your M8N is correct?

I found this one and I can see that it’s a bit odd:
http://www.holybro.com/manual/Micro%20M8N%20Manual_v1.0.pdf

Yes, I have checked many many times. Made sure it is the bottom view, not top view. Even so, as I said, I also swapped Rx and Tx. The other two pins are for power. There should be no way to make mistakes.

I just thought about the pinout on Pixhawk. Where is the pin 1 of GPS port? If we look at the Pixhawk as shown above. Is the left most pin 1 or right most?

Pin 1 is where the cable is red, so leftmost.

The pin connection is correct then.

I ran ‘gps status’ command and got following output.

nsh> gps status
INFO [gps] Main GPS
INFO [gps] protocol: ASHTECH
INFO [gps] status: NOT OK, port: /dev/ttyS3, baudrate: 0
INFO [gps] sat info: disabled

I think the protocol should be UBX. Why it is ASHTECH?

I think it tries all of them one by one. Why is the baudrate 0?

Have you checked this docs page?
https://docs.px4.io/en/peripherals/serial_configuration.html

And can you write down the params you have set for the GPS and serial config?

I followed that document to set GPS and params. Following is the config.

1 Like

Looks correct. And you have checked cables, or tried to replace any of the parts?

The cable is good. I measured the resistance from one end of the cable to the other end. Almost 0 ohm. I have only one Pixhawk and one GPS. I can’t replace parts to debug.

I added some debugging print in drivers/gps/devices/src/ubx.cpp and found all sendMessage() and waitForAck() failed in GPSDriverUBX::configure(). Eventually connection and/or baudrate detection failed. GPS keeps looping all protocols and baudrates.

Okay, problem solved. One terminal in DF13 connector on the cable had bad connection with the pin in GPS connector on Pixhawk. After doing some adjustment, the GPS works now.

Thanks JulianOes for the help.

1 Like

Yay, glad you could figure it out!