taitex

  • *
  • 24
uBlox GPS works with Revo but not u-Center
« on: August 10, 2016, 06:24:23 pm »
I have a uBlox NEO-M8N that works with Revo Main port at 19,200 baud on LP 15.09 release. I get lots of sats on the GPS view.

But I would like to change some parameters on the M8N.

However, when I connect it to u-Center it will not get a response from the M8N. No stream of GPS data is received. Or when just trying to Poll the USB data (UBX-CFG-PRT) nothing is returned. I've tried 19,200 and 57,600 as they both worked with LP. I've tried connecting using ComBridge and via a USB and a FTDI adapter. Occasionally, I will get an UNKNOWN response of 64k bytes of binary data.

I'm not sure what state the M8N is in that would allow LP to work with it but not u-Center? What 'magic' does LP use so that it can get data back? Any suggestions on what to try to get u-Center receive the same data?

The first image below shows the working setup on LP. The same setup is used when a ComBridge is attemped. The second image show the USB/FTDI direct setup.

hwh

  • *
  • 1018
Re: uBlox GPS works with Revo but not u-Center
« Reply #1 on: August 10, 2016, 07:32:03 pm »
No "magic".  Unless you disabled autoconfig it tries different baud rates until it gets a response and then changes the settings to optimize them for it's use.  It does this every time the revo boots up.

The picture of your GPS looks like it doesn't have a flash chip installed so it may come up with ublox's default 9600 baud rate.  Have you tried that?

taitex

  • *
  • 24
Re: uBlox GPS works with Revo but not u-Center
« Reply #2 on: August 11, 2016, 02:19:04 am »
If I set the Main Port on the Revo to GPS 9600 uBlox, the System Health GPS will be crossed out. Only when I set it at 19,200 or higher will LP no show a cross and start getting satellites.

9600 did not change the behavior of u-Center either when using Revo as a 9600 ComBridge.

I thought your suggestion was the solution as it made sense. Nothing is making much sense now. Anything else I should try.

hwh

  • *
  • 1018
Re: uBlox GPS works with Revo but not u-Center
« Reply #3 on: August 11, 2016, 03:11:30 am »
It's probably just me but I've never liked combridge, I always seem to have problems with it.   I always use a usb-serial adapter.

I have several of the cp2102 boards including at least one the same as you show.  It has 3.3v on the VCC pin instead of the 5v the GPS is expecting.  I'm not sure what your board is putting out.   If you try to run the GPS on 3.3v it doesn't always work right because the regulator on the GPS is expecting an input voltage higher than the 3.3v it's putting out.   Sometimes it works, sometimes it doesn't.

I'd make sure the GPS is getting 5v from the cp2102 (or somewhere else) and try various baud rates in ucenter with it.  And even though your picture looks like it's wired correctly (I'd wire it that way myself) I'd probably try with TX and RX swapped just to make sure.

The only other thing I can think of is you show the wires from the cp2102 just pushed through the holes in the board, that might not make a really good contact.  When I do a temporary connection like that I usually put toothpicks in the holes with the wires to press them against the sides and make the best contact they can.


taitex

  • *
  • 24
Re: uBlox GPS works with Revo but not u-Center
« Reply #4 on: August 11, 2016, 06:38:40 am »
I was not trusting of the ComBridge too. But did get it to work just fine with a NEO-6M receiver I have. So that gave me the confidence to try it with this one that is giving me problems.

I had already worried about the UPS power issue too. I took the VCC & GND from the Main Port of the Revo with it configured for GPS (to insure it is powered if that does matter?). With the LiPo plugged in, I assume this is the needed 5v as it is what will normally drive the GPS.

I've made sure the wires are hard in the holes too. I've tried it swapping Tx/Rx.

I can get it to kind of work on 57,600 baud. See the attached image below. It is very inconsistent on only occasionally sending back 64K worth of UNKNOWN data. I can't reproduce it reliably.

The other thing I noticed is that in the Message window of u-Center, NONE of the items are bold but they are all grey. I think this means they are Disabled and will not be sent. I have tried to Enable all Child message and individual ones. They still remain Disabled after the explicit command. u-Center may not enable them unless the Enable command gets a response. And it never does. This is not the behavior I see with the NEO-6M.

It won't reply to any message including messages that say reply to these messages.

I tried another thing, using the ComBridge set at 57,600 I get 64K dumps about every 15 seconds, repeatedly. Just sends it and nothing has to be done! Everything else is the same. No Polled commands return anything and no Messages are or can be Enabled. I think the ComBridge works. The cable is the same one used by LP when it gets good GPS data. So there are no electrical issues in this configuration.

I see in the specs that Pin 1 on the chip is a SAFEBOOT_N that the manufacture should have left open. This may restore the 'default configuration". Have you tried this? Would I add GND or VCC at power up to try it?


taitex

  • *
  • 24
Re: uBlox GPS works with Revo but not u-Center
« Reply #5 on: August 11, 2016, 07:10:32 am »
Looking at the code, there is a AUTOBAUDCONFIGURESTOREANDSTORE. Might this option get LP to save the configuration that it is using that works? Or reset to factory defaults?

hwh

  • *
  • 1018
Re: uBlox GPS works with Revo but not u-Center
« Reply #6 on: August 11, 2016, 07:44:47 am »
It's worth a try, it shouldn't hurt anything.  I'm not sure if the module on that gps will save the settings or not since the board doesn't have a flash on it.

I can't think of how the settings could be wrong enough to stop ucenter from working but allow the revo to configure it and use it. The revo autoconfig looks for the gps at various baud rates and then sends the command to reset to defaults.  Then it turns off all the NMEA output and turns on the ublox binary messages it wants.

Have you tried the reset to defaults procedure in https://librepilot.atlassian.net/wiki/display/LPDOC/Configure+a+GPS+for+CC3D ?  It's written for a cc3d but up to the reset command it should work for anything.

taitex

  • *
  • 24
Re: uBlox GPS works with Revo but not u-Center
« Reply #7 on: August 11, 2016, 09:35:35 am »
I had tried the reset to default procedure already to no avail.

Yeah!! AUTOBAUDCONFIGURESTOREANDSTORE did work. There is some "magic" in there that u-Center couldn't do on its own (or really I didn't know which sequence of items to try).
Now I've receiving data over the ComBridge at 57,600 baud and the Messages are shown as Enable in the Messages window. Plus, Enabling and Disabling other messages now works too. This was my original goal.
Thank you for your assistance HWH.

Re: uBlox GPS works with Revo but not u-Center
« Reply #8 on: August 21, 2016, 09:28:04 pm »
For anyone reading this in the future, the default is to automatically configure the GPS according to what LP firmware expects.

LP autoconfiguration has some settings to allow you to change what it gets automatically configured to for some common settings.  You should use those if they do what you are looking for.

If you want to use different settings not available from the GCS, you must manually configure the GPS with all necessary settings plus your desired changes, and disable autoconfiguration.
The way to do that is to:
- GCS set the GPS baud rate to what you want it to be
- GCS set the GPSSettings to what you want it to be
- GCS use GPS autoconfiguration AUTOBAUDCONFIGURESTOREANDSTORE to permanently save the default LP settings
- GCS disable GPS autoconfiguration

Now your GPS has LP defaults stored permanently in it and LP GPS autoconfiguration is disabled.  Now you can use u-center to make changes and save them permanently and you will actually be flying, using the LP settings plus the changes you make.

taitex

  • *
  • 24
Re: uBlox GPS works with Revo but not u-Center
« Reply #9 on: August 22, 2016, 07:22:57 am »
Thank you Cliff. Makes it clearer and will help others