-
Notifications
You must be signed in to change notification settings - Fork 26
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
Startup fails due to GPS module communication #340
Comments
Wow thanks for all this detail and investing the time. We can drop the OpenBikeSensorFirmware/src/gps.cpp Line 131 in 53e9ea4
Can you confirm that the module supports only limited set of UBX messages? Can you try the "important" messages for the OBS: |
Hi @amandel ! Thanks for your quick response. Can you give me a hint how to enable this message with the u-blox u-center? The GUI is not very intuitive. IIRC I've tried to use UBX CFG-MSG in the past but did not see any effect (probably also received ACK-NACKs). I've added some module test firmware to investigate further: https://forum.openbikesensor.org/t/modultests/1685 See also: https://github.com/maehw/ObsHwModuleTests/blob/main/ObsGpsTest/README.md |
The useful window in u-center is the Messages View window (opens on F9 in my version). There you can go down the Tree: UBX-NAV-POSLLH as a sample. If "Autopoll" is enabled or you press "Poll" in the status bar of the window you should see the current date (or not see if it does not work). At UBX-CFG-MSG you can also create and send the cfg messages. What does it show for UBX-MON-VER? |
Okay, thank you for those hints. I had played around with the Messages View before. The current module under monitoring only shows NMEA messages. UBX is grayed out. I can double click the menu entry (e.g. NAV-POSLLH) or choose Poll Message or Enable Message or Disable Message. The GUI stays grayed out. However, the binary console shows some entries with µB sync bytes (0xB5 0x62), i.e. UBX binary messages. But I am not sure if they are sent to the GPS module or received from it. I'd have to attach the logic analyzer again. IIRC UBX is limited as low baud rates (such as 9600) may limit capabilities due to limited bandwidth. I don't quite understand the persistency concept yet - is the "port" (we use the NEO-6M's "serial port") configuration stored and loaded during power-up? Or only when controlled from OBS? Are you using u-blox u-center with a baudrate of 115'200 or 9600 baud or should it not make a difference? I think I need a noob-friendly step-by-step manual. Too many things that can go wrong. I am adding an UBX/NMEA message reception indicator in the test firmware. Edits:
Edit: Michael gave me the hint that I could simply remove the ESP32s from their sockets to connect the GSP modules soldered to OBS PCBs via USB/serial converters directly (without VCC) w/o interference from the MCU. |
Tiny update as I am wiser and older now. I've got three different GPS module type on my desk. They behave differently on the serial, after supplying power. They all tell version identifiers in their first three lines, abbreviated:
Not sure if those that say they're u-blox really are... 1On the topic: u-blox v Techtotop: China’s Developing Jurisprudence on Evidentiary Burden Shifting Those claiming they are u-blox are communicating with 115'200 baud and seem to be configurable. The start with some messages but are silent (probably until re-configured properly). Those claiming they are Techtotop are communicating with 9600 baud and are babbling NMEA... probably not even configurable a bit. We could add detection of Techtotop ones and I think one even could add support for NMEA-only modules - if they provide all relevant info and the OBS project is willing to support them. |
We had a discussion about supporting NMEA-only modules a few years back (also because someone had received them despite ordering Neo6m). AFAIR Back in the day it turned out that the modules in question were so shitty (bad position values, bad fix) that implementing NMEA support for them would have been a waste of time - The hardware was bad enough that they would have had to be exchanged even in case the the firmware had supported NMEA. Unfortunately I can't find the thread and it may have been discussed during a call. |
Hi all!
As I've taken my notes in English (and everything is becoming quite technical), I am adding his as an issue to github, not the the OBS forum:
We are currently trying to build some OBS HW v00.03.12. The flashed firmware version is OBS/v0.18.849.
As we've previously seen GPS modules failing, we've been testing the GPS modules in advance: we've hooked the modules up to a Windows PC using a USB/serial converter cable and running the u-blox u-center GNSS evaluation software (using a small test jig). Everything worked fine - all the GPS modules all got fixes with their antennas were attached, at least 4 satellites in sight, quick fix!
When being soldered on to the OBS PCB, the OBS won't boot up correctly and "freeze" showing "0 sats SN:0" in the display.
I've made two approaches to narrow the issue down:
Approach 1
Initialization: agreement on a common baud rate
$TDINF
messages,$GNRMC
,$GNGGA
, 2x$GNGSA
, 3x$GPGSV
,$BDGSV
,$GNTXT
including the textANTENNA OK
)CFG-RINV
at 115'200 baud and doesn't get an answer after 200 ms twiceCFG-PRT
for reconfiguration to 115'200 baud, directly switches itself back to 115'200 baud and re-sendsCFG-RINV
at the higher baud rate while the GPS still sends using the lower 9600 baud rateACK-ACK
for theCFG-PRT
message at that higher rateContinued failed queries of the remote inventory
CFG-RINV
query as it has not gotten a response in the meantime$GNRMC
,$GNGGA
,$GNGSA
,$GPGSV
,$BDGSV
,$GNTXT
NMEA messageCFG-RST
requestACK-ACK
forCFG-RST
Failed message configurations after reset and still no remote inventory
CFG-MSG
request for message0x0B 0x32
, i.e.AID-ALPSRV
ACK-NACK
AID-ALP
,MON-VER
,MON-HW
,NAV-STATUS
andCFG-NAV5
MON-VER
CFG-NAV5
CNFG-NAV5
requestCFG-NAV5
$GNRMC
,$GNGGA
,$GNGSA
,$GPGSV
,$BDGSV
,$GNTXT
NMEA messageCFG-RINV
CFG-RINV
CFG-MSG
for0x01 0x20
, i.e.NAV-TIMEGPS
with a rate of1
on the relevant portACK-NACK
from the GPS moduleCFG-MSG
for0x01 0x03
, i.e.NAV-STATUS
with a rate of1
on the relevant portACK-NACK
from the GPS moduleCFG-MSG
for0x0A 0x09
, i.e.MON-HW
with a rate of1
on the relevant portACK-NACK
from the GPS moduleFindings
MON-VER
doesn't look as if it was conforming to the specification (I'd expect a 40 byte long reply with 30 bytes software version and 10 bytes hardware version); the value starts withT3,RomFw,1.1(48)
, not sure if this is what one would expect from an original u-blocks module!CFG-RINV
reply at all? Nor an empty dump neither even anACK-NACK
(not sure if we expect anyACK-*
though)?ACK-NACK
to theCFG-MSG
requests?Approach 2
I haven't put the same amount of effort into analysing this situation. But after start-up it looks like the GPS sending at 115'200 baud and the OBS having fallen back to 9600 baud - so the cyclic NMEA messages may not even be interpretable as ASCII/NMEA messages. All UART input is garbage this makes everything fail?!
Summary
I am not sure what's going on but I can provide further debugging details when I get some guidance.
Random thoughts:
I haven't dived too much into the firmware.
Your help is highly appreciated.
Edit:
I played around with the u-blox u-center and found out about the NMEA messages:
GxGGA
seems to stand for Global Positioning System Fix DataGxGSA
GNSS DOP and Active StallitesGxGSV
GNSS Satellites in ViewGxRMC
Recommended Minimum Specific GNSS DataGxTXT
Text TransmissionBDGSV
still seems like random unknown magicMaybe they cannot be deactivated and are even required by the OBS? Or did u-blox u-center just activate them because of its opened views and store those settings on the module?
E.g. GxGGA "SVs Used" or GxGSA "SVs Used": "Number of SVs used for Navigation"
Could OBS display the min./max.
C/N_0
of the 4 satellites with the bestC/N_0
instead of some magic (absolute?)noisePerMs
noise level fromMON-HW
? Maybe the latter correlates withN_0
but doesn't give any info about signal reception quality?Edit2:
Okay, does not look like any NMEA relations:
Gps::parseUbxMessage()
callsmIncomingGpsRecord.setInfo(mGpsBuffer.navSol.numSv, ...)
when it receives UBXNAV-SOL
messages.GpsRecord::setInfo(uint8_t satellitesInUse, GPS_FIX gpsFix, uint8_t flags)
stores the argument in membermSatellitesUsed
Gps::showWaitStatus()
printsString(mCurrentGpsRecord.mSatellitesUsed) + "sats SN:" + String(mLastNoiseLevel);
on the displayFrom a static code analysis (not runtime debugging) view, we're stuck in the following endless loop:
gps.hasFix()
usesGpsRecord::hasValidFix()
(https://github.com/openbikesensor/OpenBikeSensorFirmware/blob/53e9ea4440d13a7292031f45227c5144bc04e8e1/src/gpsrecord.cpp#L118..L121) which includes&& mSatellitesUsed != 0
as conditionNAV-SOL
message which never has been requested (according to my log above)The text was updated successfully, but these errors were encountered: