GPS problems with Rover 4.0 on Matek F405-STD Flight Controller - aiming for RTK

I expect this question should also go in the ArduPilot Topics also?
Hello, I’m a newbie, I wonder if you generous and clever people can help me (I’m not just flattering you – I genuinely think this Free software project is fantastic) . I’m experiencing problems connecting a GPS to ArduPilot Mission Planner , which I would like to use for a Rover using RTK.

The first problem is that I couldn’t connect a GPS to ArduRover (V4.0.0).

I gave up trying to connect a Ublox C099-F9P Application board (the eventual target GPS – intended to provide RTK) and reverted to a simple Ublox Neo-6M, but this would not connect to ArduRover on the Flight Controller either.

The Flight controller I’m attempting to use is the Matek F405-STD.

I’m using Mission Planner 1.3.70 build 1.3.7277.34800.

If I change the Flight Controller Firmware to use ArduPlane V4.0.5 (0bfa2638) then I can connect the Neo-6M, but NOT the intended target GPS (C099-F9P Application board).

My limited experience of Mission Planner and U-Center leads me to believe that even if there is a problem with ArduRover which you can point me to, or perhaps fix, I will still have some extra issues:

It appears from experimentation with the Neo-6M that the reason the C099-F9P will not connect to the Flight Controller is because the output from the C099-F9P is limited to NMEA Messages. Added to that, I am also dubious as to whether the Application board will respond like a normal Ublox GPS would to Automatic setup Messages from the Flight Controller.

I believe I have eliminated the possibility that signal levels are an issue (not 5V versus 3.3V) as they appear to measure the same as for the Neo-6M I.e. 3.3 Volt high and modulated to 0 Volts by data. Incidentally, I can’t actually find the signal levels required by the Matek.

When I try to make Neo-6M output NMEA, either it will not connect, or when it does connect it is because the Flight Controller has Automatically set it to 115200 baud and Set the protocol Output to UBX. (the baud rate isn’t an issue – but it is frustrating that I don’t even have control over that).

I have only found four settings, which I think, would seem to be pertinent:

Two settings in the Standard Params :

1 - Serial 3(GPS) Baud Rate (SERIAL3_BAUD) – which I’m leaving at 38400 – and is routinely ignored :blush:.

2 - Serial 3 (GPS) protocol selection (SERIAL3_PROTOCOL) which I’m tending to leave at NMEA Output and again is ignored :blush:.

and two settings in the Advanced Params

3 - Automatic GPS configuration (GPS_AUTO_CONFIG) – obviously tried turning OFF or ON.

4 - GPStype (GPS_TYPE) - I’ve tried None, AUTO, uBlox and NMEA with a variety of changes to the other 3 settings with no joy achieving the configuration I would like I.e. Connecting and responding to NMEA Messages at (say) 115200 baud.

So to summarise, I would like to be able to set the Matek F405-STD to receive NMEA GPS Messages from a NEO-6M (baby steps) whilst using the ArduRover Firmware.
Connecting to the C099-F9P can be for a later day…
All the very best

Greg

PS

Some additional information, and one stage I “sniffed” the output from the Serial 3 TX line (with U-Center connected with a HDMI module) and found this in the U-Center – TEXT Console:

??:??:?? $PUBX,41,1,0023,0001,115200,0*1C

??:??:?? $PGCMD,16,0,0,0,0,0*6A

??:??:?? $PSRF100,0,38400,8,1,0*3C

Which, I think, appears to set the baud rate to 38400, then put the UART into Binary Mode, then set the baud rate to 115200.

Here are two copies of the Mission Planner Messages window the first shows the result of manually changing the GPS_TYPE to AUTO
image

The second shows the Message Window at start up when the GPS UART is first detected:
image

Gregory,

Welcome to the forum!

Ardurover can indeed automatically configure an F9P.

I have been using a Zed-F9P with Ardurover for several months now. What particular eval board do you have? I assume that it might be the ublox C099-F9P. Is it? That board has some extra complexity that is nice if you need it, but gets in the way of a simple connection to Ardurover. There are a couple of ways to make it work, but I would like to confirm that this board is what you have before I try to explain. :slight_smile:

By the way, the Ardusimple RTK2B is much more friendly with Ardupilot (any variety) as it does not have the extra wifi complexity of the C099-F9P. And the Ardusimple has a GST connector just ready to connect to the flight controller.
Kenny

Hi Kenny, thanks for the rapid reply.

It seems I should have spoken to someone like you before I embarked on this project :wink:

I have two C099-F9P Application boards – they were marginally cheaper than the (I now realise) more ubiquitous Ardusimple, Switzerland felt closer than the USA, and I felt dealing with Ublox more directly should pay off.

I have found that the C099-F9P has been a bit of a beast for my old head to master, and their forums have been a little sparse on useful information.

If I had the decision to make again I think I would go for a breakout board which gave me more direct access to the ZED-F9P.

I feel quite disappointed that I can’t get any UBX out of the Application Board yet have no problem with their simpler and 100 times cheaper basic GPS modules! :blush:.

Any help would be gratefully received…

Regards

Greg

Hi again Kenny, I’ve reread my original email to the forum and now realise I misspoke. I meant to say “…I gave up trying to connect a Ublox C099-F9P Application board…”. I’ve now corrected that blunder to avoid misleading anyone else.

As you evidently realise the ZED-F9P as a standalone chip, is quite a different prospect than the one wrapped up in the C099-F9P Application board. I thought I was doing the smart thing when I embarked on this project by using Ublox own board, not realising it would lead to these limitations.

All the best

Greg

Greg,
I am unsure why you couldn’t get the NEO-6M is not working with Ardurover. It should I think. You should be able to set the GPS type to AUTO or UBLOX and it should work.

But on the C099-F9P:

As a first step with the C099-F9P, we just want it to talk to Ardupilot. Ardupilot will set the configuration for you in the F9P if you have the RX and TX connected. But here is a catch: you must use UART1 of the C099-F9P. UART2 is not as full-featured as UART1. UART2 cannot send the UBX binary protocol which is the protocol Ardupilot will attempt to configure in the F9P.

On the C099-F9P board, you need to set the jumper to 40E like this:

That will disconnect the UART1 RX pin from the ODIN Wifi/BT module and connect it to the Arduino header pin labeled “ZED RX”.

Now, you should be able to connect the ZED RX to the GPS TX on the pixhawk and the ZED TX to the GPS RX on the Pixhawk. If you have the GPS type set to AUTO or UBlox, Ardupilot should discover the C099-F9P and configure it. The only thing I am unsure of is if Ardupilot will always be able to match the baud rate of the F9P. I went ahead and set my baud rate using ucenter to 115200 but I would just give it a try without doing anything in ucenter first.

I need to add that it has been a few months since I had my C099-F9P connected to my Pixhawk. I have an Ardusimple RTK2B now but I am still using a C099-F9P for my RKT base. I’m saying this so you will know that I might not remember something right! I can connect my 2nd C099-F9P to be sure it does work as I say at some point if need be.

Looking forward to hearing from you.

Kenny

1 Like

Hi Kenny, I had a bad day yesterday, couldn’t get the Neo-6M to connect with the Flight Controller at all. I hadn’t changed anything – spent a few hours checking, rechecking, swapping wires and resoldering joints etc. all to no avail.

Same thing this morning.

I then tried something outlandish – I changed the Firmware to INAV.

That worked first time with just 3 easy changes. The little GPS worked fine. But again I couldn’t get it to work with NMEA (option alternate to Automatic detection) .

So that, and your own observation of UBX protocol being the preferred setup (I can understand why with more efficient framework and faster looping) has convinced me NMEA seems to no longer favoured by the different communities.

I expect the Matek F405-STD Flight controller hasn’t had all the options available (yet?) and if NMEA is not in favour may never have.

I would be interested to know if you can set Baud Rate and protocol manually on your Pixhawk – that may be an option for me.

If it were possible, then maybe I’m just looking at a new Flight Controller.

As regards the C099-F9P, I gave that a try on INAV with no success even when I manually set it as you described and with the correct baud rate, outputting UBX on pin J9-2 and Receiving on pin J9-1 (with ARD UART link in) – but no joy.

The multiplexing of the various UARTs using those jumpers needs some clearing up – but I was successfully getting RTK corrected NMEA messages before making the changes.

I haven’t checked, but fully expect that wont be the situation now – and don’t know if that is going to be the solution – or was it a one-off which would set the GPS until it was next physically changed?

But until I can control the simpler NEO-6M reliably into the Matek F405-STD then the RTK correction will have to wait.

I think I’ll have to pluck up the courage and face the rather daunting UBLOX forums to see if I can get a solution from them…

Thanks for your efforts.

Regards

Greg

Greg,
Today I had time to connect one of my C099-F9P boards to a Pixhawk and experiment a little. So, I can confirm that if you connect the ZED-RX and ZED-TX to the Pixhawk GPS TX and RX, Ardurover 4.0 will configure the F9P for you.

I had Ucenter connected to the USB port on the C099-F9P and with the Pixhawk off, I changed the protocol out for UART1 to something other than UBX (NMEA for instance) and then started the Pixhawk and connected to it with Mission Planner. After a few seconds, Mission Planner showed that there was a GPS connected. And if I made Ucenter poll the GPS again, it showed that the protocol had changed to UBX.

This was all with the baud rate of the GPS set to 115200. I then repeated but this time I changed the baud rate to 230400 and the protocol of the GPS to something other than UBX. Again, Ardurover recognized the GPS and when I looked in Ucenter, the F9P was at 115200 and UBX. So, it was using autobaud to communicate with the GPS and then set it up the way it wanted it.

However, if I set the baud in Ucenter to 460800, the Pixhawk did NOT recognize and configure the F9P. I did not try this more than once, so it could have been a fluke, but I am guessing that perhaps the Pixhawk can’t run at that high of a baud rate and so if that is the baud rate that is currently set in the F9P, it will NOT work. And, that is indeed the baud rate that will be in the F9P from the factory because that is the baud mentioned in the F9P User Guide for UART1 to talk to the ODIN wifi chip. So, you may have to go into Ucenter one time and set that baud rate.

I hope you can follow all that!
And I’m sure the developers are saying “we could have just told you all that!”

If you have not used Ucenter much, it can be bear to figure out. One gotcha for sure is that you have to be sure to save any changes you make to flash before you power down or they will be lost.

Keep at it. You will get there. If you would like to have a video or audio chat about all this, PM me.
Kenny

Hi Kenny, thanks for your reply.

There are two problems that I have.

  1. I need to use NMEA (as the C099-F9P is limited to that output on UART 2)

  2. I need to set the baud rate not to exceed 115200 (a limitation of the Matek F405-STD Flight Controller).

So you say “…I had Ucenter connected to the USB port on the C099-F9P and with the Pixhawk off, I changed the protocol out for UART1 to something other than UBX (NMEA for instance) and then started the Pixhawk and connected to it with Mission Planner. After a few seconds, Mission Planner showed that there was a GPS connected. And if I made Ucenter poll the GPS again, it showed that the protocol had changed to UBX…”

Presumably, you had ArduRover set to Autodetect which makes it output UBX messages – which is no good for me.

You then say “…This was all with the baud rate of the GPS set to 115200. I then repeated but this time I changed the baud rate to 230400 and the protocol of the GPS to something other than UBX. Again, Ardurover recognized the GPS and when I looked in Ucenter, the F9P was at 115200 and UBX. So, it was using autobaud to communicate with the GPS and then set it up the way it wanted it…”

Which tells me that it ignores the Manual settings for baud rate and protocol (SERIAL3_BAUD & SERIAL3_PROTOCOL)

when GPS_AUTO_CONFIG or GPS_TYPE are set to AUTO – which I would expect.

That is an improvement on my situation with Ardurover not communicating at all with either my Neo-6M or the C099-F9P.

I expect that is a limitation of my Matek Flight Controller.

Can you manually set SERIAL3_BAUD to 115200 and SERIAL3_PROTOCOL to NMEA with GPS_AUTO_CONFIG not detecting, and GPS_TYPE set to NMEA; and get NMEA messages at 115200 baud?

Hi Kenny, thanks for your reply.

There are two problems that I have.

  1. I need to use NMEA (as the C099-F9P is limited to that output on UART 2)

  2. I need to set the baud rate not to exceed 115200 (a limitation of the Matek F405-STD Flight Controller).

You say “…I had Ucenter connected to the USB port on the C099-F9P and with the Pixhawk off, I changed the protocol out for UART1 to something other than UBX (NMEA for instance) and then started the Pixhawk and connected to it with Mission Planner. After a few seconds, Mission Planner showed that there was a GPS connected. And if I made Ucenter poll the GPS again, it showed that the protocol had changed to UBX…”

Presumably, you had ArduRover set to Autodetect which makes it output UBX messages – which, unfortunately, is no good for me.

You then say “…This was all with the baud rate of the GPS set to 115200. I then repeated but this time I changed the baud rate to 230400 and the protocol of the GPS to something other than UBX. Again, Ardurover recognized the GPS and when I looked in Ucenter, the F9P was at 115200 and UBX. So, it was using autobaud to communicate with the GPS and then set it up the way it wanted it…”

Which, I think, tells me that it ignores the Manual settings for baud rate and protocol (SERIAL3_BAUD & SERIAL3_PROTOCOL) when GPS_AUTO_CONFIG or GPS_TYPE are set to AUTO – which I would expect.

That is an improvement on my situation with ArduRover (on the Matek Flight Controller) not communicating at all with either my Neo-6M or the C099-F9P.

I expect that is a limitation of my Matek Flight Controller, or maybe , the s/w development for the Matek.

Can you manually set SERIAL3_BAUD to 115200 and SERIAL3_PROTOCOL to NMEA with GPS_AUTO_CONFIG not detecting, and GPS_TYPE set to NMEA on your Pixhawk? – does this work with your C099-F9P when it has NMEA messages at 115200 baud on UART 2?

IF you recall, I changed the firmware to ArduPlane I could get my NEO-6M to occasionally to connect, but never the C099-F9P.

Now the firmware is on INAV (initially 2.4) I can get both to connect, in a very stable environment, and use INAV’s settings to control the communications – ALL with no other changes than the Firmware.

I then upgraded to INAV 2.5 (as it was released last week) and offers some limited (but hopefully improving) Rover support.

I’m not sure if there will be support for the sort of steering my Rover needs though – at least not yet.

But I’m now stuck again, my experimentation is going to be very limited in the next 2 weeks because of “lockdown” my man-cave has been taken over by a “terrible-twos” grandchild (the key-workers can’t work from home whilst the little madam is ruling the roost).

I had reached the stage where I reset the Rover C099-F9P back to the Initial Rover settings, changed the UART 2 to output NMEA at 115200, and I think my ‘golden’ little yellow RTK STATUS LED on the Rover was blinking – but can’t be sure – I was interrupted a couple of times.

Then I noticed that the stream of GPS data was intermittent when received from the C099-F9P but constant when using the NEO-6M.

That turned out to be the refresh rate – the NEO-6M was (by default) on 5 Hz (200mS), whilst the C099-F9P was at 1Hz.

But because the Base aerial is pointing out of the front of the house downstairs window and the Rover is pointing out of an upstairs back window I don’t always get connection over the ODIN Transceiver so I’m now wondering whether RTK will work with these conditions on the C099-F9P – and I can’t try that either!

If you could help with further experimentation that would be much appreciated, until I can return to my cave – it will decide whether I need a Pixhawk Flight Controller, if not – don’t worry if you can’t, you have been very useful – if only to clarify my thoughts…

All the very Best.

Greg

Greg,
OK. I was going to ask, but I know from your comment that you are trying to use the built-in WiFi for your RTCM3 communication. That complicates things, but can be solved.

One comment about NMEA: I think I have read here on the forums that NMEA is not good to use because it is so bloated, being text based, that it consumes too much time to allow an update every 200 mSec. I know that UBX is preferred. But, the F9P can’t put out UBX on port 2.

So, the fix is to modify the C099-F9P board slightly (basically added some jumper wires) so that the ODIN chip is connected to UART2 and not UART1, freeing up UART1 for the comm with Ardupilot.

@BRADD_ANDERSON has done this and has his system working. He and I have conversed via email and phone about it a few times. He had a Ublox engineer guiding him. Perhaps Bradd will jump in or you may want to contact him directly.

I am NOT using the builtin WiFi, although I did try it on my bench when I first received the boards. So, for me, I am using UART2 for the RTCM3 and using UART1 (with the jumper set on 4OE).

Kenny

Greetings Kenny,

I’m glad you felt like you could do that, I got no problems with that. I’m grateful for all the help I’ve got.

Haven’t had a chance to configured those compasses I hope to try and get it fit into my schedule tomorrow.

Kind regards Bradd

Hi Bradd, this sounds really interesting…

If you can suggest a modification that allows UBX output from the C099-F9P I would be really interested.

Regards

Greg

image001.jpg

Greetings Gregory,
Not sure how to send pictures showing wiring connections perhaps you could email me.

Kind Regards
Bradd Anderson

(403)466-8826

fellowcampers@gmail.com