Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[gps] fix ubx ucenter autobaud and autoconf #1480

Merged
merged 2 commits into from
Dec 18, 2015
Merged

[gps] fix ubx ucenter autobaud and autoconf #1480

merged 2 commits into from
Dec 18, 2015

Conversation

gautierhattenberger
Copy link
Member

should fix #1459
tested on UBX M8M module with default config at startup

@@ -457,12 +461,12 @@ static bool_t gps_ubx_ucenter_configure(uint8_t nr)
if (gps_ubx_ucenter.reply != GPS_UBX_UCENTER_REPLY_ACK) {
DEBUG_PRINT("ublox did not acknowledge port configuration.\n");
} else {
DEBUG_PRINT("Changed ublox baudrate to: %u\n", UART_SPEED(UBX_GPS_BAUD));
DEBUG_PRINT("Changed ublox baudrate to: %u\n", UART_BAUD(gps_ubx_ucenter.baud_target));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be UART_SPEED?

@gautierhattenberger
Copy link
Member Author

Should be fine now. @fvantienen can you test on Bebop2 or any other UBX8 gps ?

@flixr
Copy link
Member

flixr commented Dec 15, 2015

@dewagter maybe you can test this, since @fvantienen is on vacation?

@gautierhattenberger
Copy link
Member Author

Actually this thing is half broken since f4ada86. Since it is saving the conf at the end and that that most of the receiver have flash, any older gps using ucenter module kept working because parameters were already correct.
I'm on vacation now, and probably most people at Delft as well. Since it is working on Ublox 8 and certainly not correctly on other modules, I suggest to merge this so the next release is not blocked by this.

flixr added a commit that referenced this pull request Dec 18, 2015
[gps] fix ubx ucenter autobaud and autoconf

The reason it is not working (at least one of the reasons...) is that the autobaud function is not working. Or exactly it is not very robust to properly catch the ACK. And if it happens to work (either it found the correct value while testing them or it falls back to the default and it is the correct one), it will not set the uart to the "new" value. It will send the message to set the baudrate to the last tested rate. This is because UBX_GPS_BAUD is defined to GPS_LINK.baudrate which is set to the last value, not the initial one.
The end result in most cases is that the modules are saturated with messages at 9600 bauds and that the reply of the version request fails, and then the NAV config is sent instead of NAV5.
I'm going to try this patch:

- save target baudrate at init
- use NAV5 by default if version couldn't be fetched
@flixr flixr merged commit cc354c6 into master Dec 18, 2015
@flixr flixr deleted the fix_ubx_ucenter branch December 18, 2015 15:19
@dewagter
Copy link
Member

I can confirm it now works nicely: change from any baudrate to any baudrate, also on ublox8 devices.

bastinat0r added a commit to ovgu-FINken/paparazzi that referenced this pull request Jan 5, 2016
Paparazzi v5.8.0_stable
=======================

Stable version release.

- module: nav_catapult: avoid conditional directives
  [paparazzi#1454] (paparazzi#1454)
- module: gps_ubx_ucenter fix autobaud and autoconf for ublox-8
  [paparazzi#1480] (paparazzi#1480)
- module: add stereocam2state which publishes a VELOCITY_ESTIMATE from stereocam
  [paparazzi#1486] (paparazzi#1486)
- arch/linux: I2C: use repeated-start for transceive as required by some sensors
  [paparazzi#1469] (paparazzi#1469)
- remove unused libeknav and fms folder
  [paparazzi#1487] (paparazzi#1487)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UBLOX 8 autoconfiguration
3 participants