inav icon indicating copy to clipboard operation
inav copied to clipboard

GPS Not working / Reset when upgraded to iNav 7

Open cpwilson opened this issue 1 year ago • 48 comments

Current Behavior

Upgrading my Nano Talon to iNav 7 and GPS stops working.

Upgraded my Nano Talon from 6.1.1 to 7.1.1 and restored DIFF and config as usual, no issues, but never actually checked GPS was working, just assumed it would be, and on arrival at field today could not get Sats at all (even after 20 mins)

Came home and checked and getting no sats at all.

FC: Matek F405-WSE GPS: BN-220 (updated in ucentre to use 115200 baud, 5Hz refresh and added Galileo - https://oscarliang.com/gps-settings-u-center/) RX: ELRS RM RP1

Steps to Reproduce

Model is on the bench and powered up the GPS is flashing RED indicating that I already have a 3D fix (just) and tested in ucenter it's all working as expected, sats received all OK.

From a clean FC with no config on there here's the process: NOTE: all physical connections tested and correct - this was all working fine on 6.1.1

  1. Installed 7.1.1 firmware (full erase) (gps still flashing as having 3d fix)

  2. In UI set port (uart3) for GPS with baud 115200 (gps still flashing as having 3d fix)

  3. Go to configuration tab and enable 'GPS for navigation and telemetry' which is where it all goes bad.

  4. GPS seems to reset/reboot when config is saved when FC reboots and 3d fix is lost.

  5. Go into GPS tab and updates are coming in (total messages) but GPS gets 0 sats and never gets fix.

  6. Rolled back to 7.0.0 and it's the same as above, never get sats.

So 7 or greater firmware will see gps page 'get messages' but never iNav never gets location, no errors or timeouts.

Rolled back to 6.1.1

  1. Installed 6.1.1 firmware (full erase) (gps still flashing as having 3d fix)
  2. In UI set port (uart3) for GPS with baud 115200 (gps still flashing as having 3d fix)
  3. Go to configuration tab and enable 'GPS for navigation and telemetry' gps keeps 3d fix and all OK (gps still flashing as having 3d fix)
  4. Go into GPS tab and updates are coming in (total messages) and GPS working fine, map updates with location.

ALL is ok so from here I could restore diff or configure the FC as usual.

Expected behavior

Would expect to upgrade to 7.x with GPS working as normal

Suggested solution(s)

Something in 7 is resetting the gps or preventing it from getting Sats

Additional context

Worth noting that rolling back to 6.1.1 is all ok, no issues whatsoever and even tried to default the BN-220 back to std but no difference there, still does not work in 7.x

No dump provided as not got that far, as soon as I enable 'GPS for navigation and telemetry' in UI GPS goes awol.

Also tried another FC and GPS (mates model with same kit in it) and get the same result all round, so 100% not hardware or connection issue.

Rolling back to 6.1.1 makes All good again :)


version

INAV/MATEKF405SE 7.0.0 Dec 5 2023 / 10:29:45 (895a4f31)

GCC-10.3.1 20210824 (release)

NOTE: also tried 7.1.1

cpwilson avatar May 27 '24 14:05 cpwilson

UPDATE: have tried another GPS unit, Flywoo/GOKU M10 Mini V3 and get the same results as the BN-220. No sats at all on 7.x up but all ok on 6.11

cpwilson avatar May 27 '24 19:05 cpwilson

Double checked the BN-220 on another FC this evening, Matek F411WSE, running 7.1.1 and all is well, get sats no issues at all.

So from my simple tests it looks like there may be a bug with 7.1.1 on the Matek F405-WSE

cpwilson avatar May 30 '24 19:05 cpwilson

Just curious, go the CLI and type: get gps

On both versions, and compare the settings

OptimusTi avatar May 30 '24 21:05 OptimusTi

Comparing 6.1.1 to 7.11 here is the differences

Not sure what the diff is between AIR_1G and AIR_2G

image

cpwilson avatar May 30 '24 21:05 cpwilson

Thanks,

gps_dyn_model = GPS Navigational Model.

I'm not 100% sure but you may want to give UBLOX7 a try and see if that works or fixes the issue in 7.1.1. Don't change anything else.

OptimusTi avatar May 30 '24 21:05 OptimusTi

Have tried UBLOX7 and freq rate change is upped to 10Hz and no errors but still no sats in 7.1.1

In 6.1.1 with UBLOX7 set all works fine, get sats :)

cpwilson avatar May 30 '24 22:05 cpwilson

Hmm, sorry to hear that. Keep ublox7 on and change gps_dyn_models to AIR_1G

OptimusTi avatar May 30 '24 23:05 OptimusTi

Tried that, no difference, still getting data from gps but never gets a sat

image

get gps

ahrs_gps_yaw_windcomp = ON ahrs_gps_yaw_weight = 100 gps_provider = UBLOX7 gps_sbas_mode = EGNOS gps_dyn_model = AIR_1G gps_auto_config = ON gps_auto_baud = ON gps_auto_baud_max_supported = 230400 gps_ublox_use_galileo = ON gps_ublox_use_beidou = OFF gps_ublox_use_glonass = OFF gps_min_sats = 6 gps_ublox_nav_hz = 10 inav_use_gps_velned = ON inav_use_gps_no_baro = ON inav_w_z_gps_p = 0.200 inav_w_z_gps_v = 0.100 inav_w_xy_gps_p = 1.000 inav_w_xy_gps_v = 2.000

cpwilson avatar May 30 '24 23:05 cpwilson

He statistics look good. Give it 10-20 minutes to see if you get sats. Other than that I'm out of ideas.

OptimusTi avatar May 31 '24 00:05 OptimusTi

Thanks for your help, its been outside for almost 30 mins and not a single sat

image

cpwilson avatar May 31 '24 00:05 cpwilson

@cpwilson Try reducing gps_auto_baud_max_supported = 115200. Higher baud rates can cause problems on longer cable runs, if noise is being introduced into the RX and TX leads.

Jetrell avatar Jun 01 '24 03:06 Jetrell

I'd go for 57600 baud then. Doesn't gps adjust the baud rate automatically?

OptimusTi avatar Jun 01 '24 04:06 OptimusTi

Surely the GPS messages are being received OK, no errors, it's just the GPS for some reason isn't resolving the satellites which sounds more like a configuration problem. Perhaps try ublox u-center with gpspassthrough command in the CLI to see if that helps.

breadoven avatar Jun 01 '24 09:06 breadoven

Changing gps_auto_baud_max_supported = 115200 makes no difference at all, still no sats

gpspassthrough in inav 7.1.1 here's what I get in messages in ucentre get when acquiring sats, no sats at all received.

??:??:?? R -> UBX NAV-PVT, Size 100, 'Navigation PVT Solution' ??:??:?? R -> UBX NAV-SOL, Size 60, 'Navigation Solution' ??:??:?? R -> UBX NAV-PVT, Size 100, 'Navigation PVT Solution' ??:??:?? R -> UBX NAV-SOL, Size 60, 'Navigation Solution' ??:??:?? R -> UBX NAV-PVT, Size 100, 'Navigation PVT Solution' ??:??:?? R -> UBX NAV-SOL, Size 60, 'Navigation Solution' ??:??:?? R -> UBX NAV-PVT, Size 100, 'Navigation PVT Solution' ??:??:?? R -> UBX NAV-SOL, Size 60, 'Navigation Solution' ??:??:?? R -> UBX NAV-PVT, Size 100, 'Navigation PVT Solution' ??:??:?? R -> UBX NAV-SOL, Size 60, 'Navigation Solution' ??:??:?? R -> UBX NAV-PVT, Size 100, 'Navigation PVT Solution'

gpspassthrough in iNav 6.1.1 here's the messages I get when acquiring sats which are very different

??:??:?? R -> UBX NAV-POSLLH, Size 36, 'Geodetic Position' ??:??:?? R -> UBX NAV-VELNED, Size 44, 'Velocity in WGS 84' ??:??:?? R -> UBX NAV-SOL, Size 60, 'Navigation Solution' ??:??:?? R -> UBX NAV-STATUS, Size 24, 'Navigation Status' ??:??:?? R -> UBX NAV-POSLLH, Size 36, 'Geodetic Position' ??:??:?? R -> UBX NAV-VELNED, Size 44, 'Velocity in WGS 84' ??:??:?? R -> UBX NAV-SOL, Size 60, 'Navigation Solution' ??:??:?? R -> UBX NAV-STATUS, Size 24, 'Navigation Status' ??:??:?? R -> UBX NAV-POSLLH, Size 36, 'Geodetic Position' ??:??:?? R -> UBX NAV-VELNED, Size 44, 'Velocity in WGS 84' ??:??:?? R -> UBX NAV-TIMEUTC, Size 28, 'Universal Time Coordinated'

As soon as I roll back iNav to 6.1.1 I get sats no problems at all so it's not a hardware or interference issue.

It seems to me as if there is a bug in the iNav v7 firmware for the F405SE

cpwilson avatar Jun 01 '24 10:06 cpwilson

What u-control messages do you get for the F411WSE running 7.1.1 ?

breadoven avatar Jun 01 '24 11:06 breadoven

GPS is 100% good in ucentre

12:19:07 R -> NMEA GNGSA, Size 50, 'GNSS DOP and Active Satellites' 12:19:07 R -> NMEA GPGSV, Size 68, 'GNSS Satellites in View' 12:19:07 R -> NMEA GPGSV, Size 66, 'GNSS Satellites in View' 12:19:07 R -> NMEA GPGSV, Size 40, 'GNSS Satellites in View' 12:19:07 R -> NMEA GLGSV, Size 64, 'GNSS Satellites in View' 12:19:07 R -> NMEA GLGSV, Size 66, 'GNSS Satellites in View' 12:19:07 R -> NMEA GLGSV, Size 31, 'GNSS Satellites in View' 12:19:07 R -> NMEA GNGLL, Size 52, 'Geographic Position - Latitude/Longitude' 12:19:07 R -> NMEA GNRMC, Size 68, 'Recommended Minimum Specific GNSS Data' 12:19:07 R -> NMEA GNVTG, Size 35, 'Course Over Ground and Ground Speed' 12:19:07 R -> NMEA GNGGA, Size 74, 'Global Positioning System Fix Data' 12:19:07 R -> NMEA GNGSA, Size 48, 'GNSS DOP and Active Satellites' 12:19:07 R -> NMEA GNGSA, Size 50, 'GNSS DOP and Active Satellites' 12:19:07 R -> NMEA GPGSV, Size 68, 'GNSS Satellites in View'

image

cpwilson avatar Jun 01 '24 12:06 cpwilson

I know the GPS is fine and when Matek F405WSE is running v6.1.1 and GPS connected to UART3 all is fine in iNav, I get sats and it 100% good.

As soon as I upgrade to any v7 iNav sees the GPS hardware, gets messages, but never gets any sats, regardless of how long I wait. That's regardless of restoring my diff or just configuring just the GPS from scratch.

Unless I am doing something wrong :( I have spent hours trying all options I'm at a dead end and can only think there is a bug in the v7 firmware for the F405wse as that's the only change I make.

Ideally need someone with the same FC and a GPS to test see if they get sats ever. I have tried 2x F405wse's and 3x GPS units, 2x BN220's and 1x Goky M10 mini and get the same result with all my hardware.

cpwilson avatar Jun 01 '24 12:06 cpwilson

I see that in U-Center it is set for GPS and Glonass and that's working. In INAV it's set for GPS and Galileo and that's not working. You might test in INAV with Glonass on and Galileo off, to match what is working in U-Center.

You might also test with sbas off.

Lastly and only somewhat related, I see use_gps_no_baro is on. If you have a baro, you'll want to turn that off.

sensei-hacker avatar Jun 01 '24 12:06 sensei-hacker

I think you need to double check the settings for the F411WSE you said worked fine with 7.1.1 and the settings for the F405WSE which doesn't. There must be some difference in the settings because I'm not aware there are any board specific settings that would override the user settings where GPS is concerned.

Having said that there were a number of GPS related changes made for 7.0.0, including removing NMEA, so something could have gone awry somewhere I guess.

breadoven avatar Jun 01 '24 13:06 breadoven

Going back to basics, via my FTDI adaptor, the gps is configured, removed SBAS and turned on Galileo as below. Getting sats no problems, granted not 20+, as it's indoors next to the window, but definitely working as expected.

image

Connected GPS back up to UART3 on F405WSE @ 115200 baud, which the GPS is set to GPS for navigation and telemetry is enabled in Configuration tab GPS setup using UBLOX7, European EGNOS, Galileo and Glonass ON

BN220 blue light flashing rapidly and no red light indicating a fix and after sitting for some time no sats at all. Messages being received but no gps lock.

image

Unplugged BN220 from F405WSE and connected back up to the FTDI adaptor and sats showing with a lock after about 20 seconds :(

To rule out any 'noise' left BN220 on FTDI showing sats and powered up F405WSE and no issues at all, sats remain

cpwilson avatar Jun 01 '24 13:06 cpwilson

Replaced the F405WSE with a F411WSE with all the same settings as I have on the F405WSE and get a fix in around 2 mins

image

cpwilson avatar Jun 01 '24 13:06 cpwilson

Rolling back iNav from v7 to v6.11 on the F405WSE and all is well, get sats in 2-3 mins

cpwilson avatar Jun 01 '24 13:06 cpwilson

Comparison of gps settings between F405 and F411 - same settings on both !

image

cpwilson avatar Jun 01 '24 14:06 cpwilson

I think you need to double check the settings for the F411WSE you said worked fine with 7.1.1 and the settings for the F405WSE which doesn't. There must be some difference in the settings because I'm not aware there are any board specific settings that would override the user settings where GPS is concerned.

Having said that there were a number of GPS related changes made for 7.0.0, including removing NMEA, so something could have gone awry somewhere I guess.

From my testing I think @breadoven may be right in that something relating to the GPS setting changes in v7 has gone wrong somewhere, but from my experience only on the F405WSE, which makes it difficult to pinpoint

cpwilson avatar Jun 01 '24 14:06 cpwilson

Could you please load a Diff for both 6 and 7.1.1?

OptimusTi avatar Jun 01 '24 15:06 OptimusTi

I have a pretty good idea what's going on and I'm helping them on Discord.

sensei-hacker avatar Jun 01 '24 16:06 sensei-hacker

but from my experience only on the F405WSE, which makes it difficult to pinpoint

@cpwilson I powered up a Matek F405-WSE I have, running 7.1.1. I let it sit inside on the bench, and it had a fix when I came back.

F405 WSE

Jetrell avatar Jun 01 '24 23:06 Jetrell

@Jetrell , thanks for checking, that's certainly good to know but does not explain why the 2 I have present the same issue.

Out of interest was the GPS a BN220 and was it connected to UART3?

I know the wiring layout Matek supply shows GPS on UART4 but it can go on any UART so they say.

cpwilson avatar Jun 02 '24 00:06 cpwilson

I was using UART 4 on the 6pin JST SH plug. True. You can place the GPS on any UART.. But preferably not UART 1 or 3 if the peripheral is powered by a 4.5v USB supply. I was using a WS-M181 module.. I don't own a BN220.

Jetrell avatar Jun 02 '24 02:06 Jetrell

Hi. Having exactly the same issue. fc is speedybee f405 wing mini and gps module is beitian be-122. gps icon is blue, and messages are coming, but no sattetlites. waited for 30 minutes without result. @cpwilson did you manage to fix it? Or I should downgrade the inav version?

rpagyc avatar Jul 18 '24 08:07 rpagyc