Broken Pixhawk GPS port - any possible solutions?

The physical port where the external GPS connects to my Pixhawk is broken, so there is no connection.

I’ve asked this on several other forums without success but can anyone tell me if it’s possible to use one of the other, spare ports on the Pixhawk to plug the GPS in instead and get it up and running?

Only other option is to buy a whole new board…?

Could you send a photo of your GPS port as it might be repairable?

Where did you buy your pixhawk board from?

Thanks for the reply - I bought it from unmannedtech a couple of weeks ago (order 104609).

Unfortunately, the plastic socket and pins have broken completely away from the main board, so it’s beyond any repair job I can undertake, but I would be over the moon if a repair is possible.

Will post pictures when I get home.

Here’s the photos as promised - as you can see the GPS socket has come clean off the board - there are no visible traces left behind to attempt a soldering job on…

@electroplated I have just sent you an email with details on how to return the board back to us so we can have a closer look and try to repair :wrench: the GPS port for you.

1 Like

Solved! There is something you can do that doesn’t require sending the Pixhawk back.

After months of trying to describe my problem to people, I finally dug into the Copter code. Here’s what I posed on the Ardupilot Forum:


Well, OK, I think I solved this issue.

I spent a few days going through the APM Copter code and found the:

AP_SerialManager.cpp

file. Down about 1/2 way are some lines:

state[1].uart = hal.uartC; // serial1, uartC, normally telem1
state[2].uart=hal.uartD; // serial2, uartD, normally telem2
state[3].uart=hal.uartB; // serial3, uartB, normally 1st GPS
state[4].uart=hal.uartE; // serial4, uartE, normally 2nd GPS

All I did was swtch hal.uartB with hal.uartE so that uartB is the 2nd GPS and uartE is the 1st.

I think this whole cpp file is where the firmware sets what serial ports are doing what.


So, I saved that and compiled a new firmware and uploaded to the Pixhawk.

Success, so far.

The telemetry on my FrSky Taranis comes up with coordinates, now! The GPS (same 3DR/ublox GPS) now is more stable and wanders (dithers) less. Drone can fly in loiter mode now.

Solved…?

I know there are a number of people who are being told by 3DR to buy another Pixhawk, but this clearly works and is free. Granted, you’re not going to be using a 2nd GPS.


With a broken GPS (Serial 3) header, you can indeed connect your 3DR uBlox GPS to the Serial4/5 header. You can change the protocol and baud rate of Serial4 to match the GPS settings of Serial3 (this is indeed the default setting in the code for Serial4).

Good:
Your GPS will fire up, and the position will be reported through lat2,long2, etc… Yeah!!!
You can do ‘auto’ planned missions.

Bad:
However, in the Flight Data part of Mission Planner the GPS Fix indicator in the HSI with continue to indicate “No Fix”. And give no GPS Fix Data (numSats, 2D/3D, etc…).

Several flight modes don’t work well.

The position of the GPS dithers much more (I cannot understand why this happens).

If you are using a Teensy 3.1 to take the MavLink Data from Telem1/2 and transmit that to your Taranis, it won’t transmit any coordinates to your RC.


Altering the code in the way I did fixes the problem!

1 Like

Thanks for sharing that, definitely better than buying a new pixhawk so thanks for sharing :smile:

However as I mentioned before I am sure its something that we could repair for you assuming the traces on the pixhawk board have not been pulled off when the connector broke. So if you ever need help with that, just let me know.

It worked perfectly for me, thank you very much for sharing, i lost all my hopes before reading your post, you saved my bacon!!! I used ubuntu and apm planner. Thanks again.

I’m having the same problem.

As you can see here, , the init rcS script call for a script in the SDCard:

47 # Look for an init script on the microSD card.
48 # Disable autostart if the script found.
49 #
50 set FRC /fs/microsd/etc/rc.txt
51 if [ -f $FRC ]
52 then
53 echo "INFO [init] Executing script: $FRC"
54 sh $FRC
55 set MODE custom
56 fi

My question is: Is it posible to rename de TTY device at the boot time with a config file in the SD Card like this?

/fs/microsd/etc/rc.txt
mv /dev/ttyS3 /dev/ttyS20
mv /dev/ttyS4 /dev/ttyS3
mv /dev/ttyS20 /dev/ttyS4

Hey guys, good news here. I had problems with the above procedure, just forget it. I`ve installed firmware 3.4.3 and disabled serial 3 and 5, set serial 4 as GPS option 5 baud 38. And believe me it worked!!! I am flying it as normal. POS HOLD LOITTER, RTL. everything works!!!
Please whoever need it, just try. Do not trash your old good pixhawk. I was almost doing it… Here you have a pic of my pix indoor.
Whish you all the best.

Hello there. Had the same problem with the GPS Header… I want to apply your solution of changing the Serial Port assignment, but I am having trouble with building the project. Hope you can help me.

I am following this procedure:

http://ardupilot.org/dev/docs/editing-the-code-with-eclipse.html

but also found:

http://ardupilot.org/dev/docs/building-px4-with-make.html#building-px4-with-make

and:

https://dev.px4.io/

which path would you recommend me to follow???