norbert-walter / esp32-nmea2000-obp60

nmea2000 gateway with ESP32
GNU General Public License v2.0
14 stars 10 forks source link

sporadic 'no GPS data' #66

Closed W-Geronius closed 1 month ago

W-Geronius commented 2 years ago

This bug has been hunted for since end of march - the reason unfortunately remains unclear. This issue is created to summarize different findings in a single place.

Sporadically, 'no GPS data' is displayed, time and position data disappear. Signal usually is recovered within a few seconds. No obvious pattern

W-Geronius commented 2 years ago

'no GPS data' arises as soon as date->valid == false. See OBP60Extensions.cpp lines ~210 ff. To understand further logs, I introduced debug statements there: LOG_DEBUG(GwLog::ERROR,"... OBPExtensions: GPS lost") LOG_DEBUG(GwLog::ERROR,"... OBPExtensions: GPS retrieved")

date is invalidated by main esp-nmea2000 code. As to Andreas, only timestamps are compared and set invalid if unchanged for >= 4 seconds. Invalid NMEA records do not result in invalid date1 To understand further logs, I introduced debug statements in main.cpp after nmea0183Converter->loop(), line ~833: logger.logDebug(GwLog::ERROR,"main.cpp: GPST invalid") logger.logDebug(GwLog::ERROR,"main.cpp: GPST recovered")

W-Geronius commented 2 years ago

Initially, GPS data (nmea0183) were received from OP/SignalK. Network problems were investigated and appeared to be the reason: image

W-Geronius commented 2 years ago

image

W-Geronius commented 2 years ago

No invalid dates occurred on M5Stack-Atom, fed by SK on Raspi via WiFi

W-Geronius commented 2 years ago

'no GPS data' occurs on plain OBP60 as well: no external input/output Page 1 set to GPST. No other pages defined and populated. GPS data originate from internal GPS !!

according to log page is drawn every second, on screen however seconds are incremented in 2 second steps!

[2022-05-31 09:17:06] GPST freezes [2022-05-31 09:17:10] GWSERIAL:79149:main.cpp: GPST invalid [2022-05-31 09:17:11] GWSERIAL:80064:... OBPExtensions: GPS lost ... [2022-05-31 09:17:15] GWSERIAL:83883:main.cpp: GPST recovered [2022-05-31 09:17:16] GWSERIAL:84642:... OBPExtensions: GPS retrieved

same happens right again at: [2022-05-31 09:17:19]

detailed log below, NMEA0183 message entries: api->sendNMEA0183Message(NMEA0183Msg); line 279 in OBPSensorTask.cpp

Detailed log. Click to expand! >[2022-05-31 09:17:00] GWSERIAL:69184:Drawing at PageOneValue, GPST: 26219.000000 [2022-05-31 09:17:00] GWSERIAL:69660: --> NMEA0183 message [2022-05-31 09:17:00] GWSERIAL:69661: --> NMEA0183 message [2022-05-31 09:17:00] GWSERIAL:69662: --> NMEA0183 message [2022-05-31 09:17:00] GWSERIAL:69664: --> NMEA0183 message [2022-05-31 09:17:01] GWSERIAL:70465:Drawing at PageOneValue, GPST: 26220.000000 [2022-05-31 09:17:01] GWSERIAL:70674: --> NMEA0183 message [2022-05-31 09:17:01] GWSERIAL:70675: --> NMEA0183 message [2022-05-31 09:17:01] GWSERIAL:70677: --> NMEA0183 message [2022-05-31 09:17:02] GWSERIAL:70678: --> NMEA0183 message [2022-05-31 09:17:03] GWSERIAL:71679:Drawing at PageOneValue, GPST: 26221.000000 [2022-05-31 09:17:03] GWSERIAL:71689: --> NMEA0183 message [2022-05-31 09:17:03] GWSERIAL:71691: --> NMEA0183 message [2022-05-31 09:17:03] GWSERIAL:71694: --> NMEA0183 message [2022-05-31 09:17:03] GWSERIAL:71697: --> NMEA0183 message [2022-05-31 09:17:04] GWSERIAL:72709: --> NMEA0183 message [2022-05-31 09:17:04] GWSERIAL:72711: --> NMEA0183 message [2022-05-31 09:17:04] GWSERIAL:72715: --> NMEA0183 message [2022-05-31 09:17:04] GWSERIAL:72717: --> NMEA0183 message [2022-05-31 09:17:04] GWSERIAL:72910:Drawing at PageOneValue, GPST: 26222.000000 [2022-05-31 09:17:05] GWSERIAL:73730: --> NMEA0183 message [2022-05-31 09:17:05] GWSERIAL:73732: --> NMEA0183 message [2022-05-31 09:17:05] GWSERIAL:73736: --> NMEA0183 message [2022-05-31 09:17:05] GWSERIAL:73738: --> NMEA0183 message [2022-05-31 09:17:05] GWSERIAL:74125:Drawing at PageOneValue, GPST: 26224.000000 [2022-05-31 09:17:06] GWSERIAL:74748: --> NMEA0183 message [2022-05-31 09:17:06] GWSERIAL:74749: --> NMEA0183 message [2022-05-31 09:17:06] GWSERIAL:74750: --> NMEA0183 message [2022-05-31 09:17:06] GWSERIAL:74752: --> NMEA0183 message [2022-05-31 09:17:06] GWSERIAL:75318:Drawing at PageOneValue, GPST: 26225.000000 [2022-05-31 09:17:07] GWSERIAL:75759: --> NMEA0183 message [2022-05-31 09:17:07] GWSERIAL:75760: --> NMEA0183 message [2022-05-31 09:17:07] GWSERIAL:75761: --> NMEA0183 message [2022-05-31 09:17:07] GWSERIAL:75762: --> NMEA0183 message [2022-05-31 09:17:07] GWSERIAL:75762: --> NMEA0183 message [2022-05-31 09:17:07] GWSERIAL:75763: --> NMEA0183 message [2022-05-31 09:17:08] GWSERIAL:76538:Drawing at PageOneValue, GPST: 26225.000000 [2022-05-31 09:17:08] GWSERIAL:76772: --> NMEA0183 message [2022-05-31 09:17:08] GWSERIAL:76773: --> NMEA0183 message [2022-05-31 09:17:08] GWSERIAL:76774: --> NMEA0183 message [2022-05-31 09:17:08] GWSERIAL:76774: --> NMEA0183 message [2022-05-31 09:17:08] GWSERIAL:76775: --> NMEA0183 message [2022-05-31 09:17:08] GWSERIAL:76775: --> NMEA0183 message [2022-05-31 09:17:09] GWSERIAL:77756:Drawing at PageOneValue, GPST: 26225.000000 [2022-05-31 09:17:09] GWSERIAL:77784: --> NMEA0183 message [2022-05-31 09:17:09] GWSERIAL:77787: --> NMEA0183 message [2022-05-31 09:17:09] GWSERIAL:77788: --> NMEA0183 message [2022-05-31 09:17:09] GWSERIAL:77790: --> NMEA0183 message [2022-05-31 09:17:09] GWSERIAL:77791: --> NMEA0183 message [2022-05-31 09:17:09] GWSERIAL:77792: --> NMEA0183 message [2022-05-31 09:17:09] GWSERIAL:77794: --> NMEA0183 message [2022-05-31 09:17:10] GWSERIAL:78803: --> NMEA0183 message [2022-05-31 09:17:10] GWSERIAL:78805: --> NMEA0183 message [2022-05-31 09:17:10] GWSERIAL:78806: --> NMEA0183 message [2022-05-31 09:17:10] GWSERIAL:78807: --> NMEA0183 message [2022-05-31 09:17:10] GWSERIAL:78809: --> NMEA0183 message [2022-05-31 09:17:10] GWSERIAL:78811: --> NMEA0183 message [2022-05-31 09:17:10] GWSERIAL:78812: --> NMEA0183 message [2022-05-31 09:17:10] GWSERIAL:78985:Drawing at PageOneValue, GPST: 26225.000000 [2022-05-31 09:17:10] GWSERIAL:79149:main.cpp: GPST invalid [2022-05-31 09:17:11] GWSERIAL:79821: --> NMEA0183 message [2022-05-31 09:17:11] GWSERIAL:79823: --> NMEA0183 message [2022-05-31 09:17:11] GWSERIAL:79824: --> NMEA0183 message [2022-05-31 09:17:11] GWSERIAL:79825: --> NMEA0183 message [2022-05-31 09:17:11] GWSERIAL:79827: --> NMEA0183 message [2022-05-31 09:17:11] GWSERIAL:79829: --> NMEA0183 message [2022-05-31 09:17:11] GWSERIAL:80064:... OBPExtensions: GPS lost [2022-05-31 09:17:11] GWSERIAL:80146:Drawing at PageOneValue, GPST: 26225.000000 [2022-05-31 09:17:12] GWSERIAL:80837: --> NMEA0183 message [2022-05-31 09:17:12] GWSERIAL:80838: --> NMEA0183 message [2022-05-31 09:17:12] GWSERIAL:80838: --> NMEA0183 message [2022-05-31 09:17:12] GWSERIAL:80839: --> NMEA0183 message [2022-05-31 09:17:12] GWSERIAL:80840: --> NMEA0183 message [2022-05-31 09:17:12] GWSERIAL:80841: --> NMEA0183 message [2022-05-31 09:17:12] GWSERIAL:80842: --> NMEA0183 message [2022-05-31 09:17:12] GWSERIAL:81281:Drawing at PageOneValue, GPST: 26225.000000 [2022-05-31 09:17:13] GWSERIAL:81852: --> NMEA0183 message [2022-05-31 09:17:13] GWSERIAL:81853: --> NMEA0183 message [2022-05-31 09:17:13] GWSERIAL:81854: --> NMEA0183 message [2022-05-31 09:17:13] GWSERIAL:81854: --> NMEA0183 message [2022-05-31 09:17:13] GWSERIAL:81855: --> NMEA0183 message [2022-05-31 09:17:13] GWSERIAL:81856: --> NMEA0183 message [2022-05-31 09:17:13] GWSERIAL:81857: --> NMEA0183 message [2022-05-31 09:17:13] GWSERIAL:81858: --> NMEA0183 message [2022-05-31 09:17:13] GWSERIAL:82431:Drawing at PageOneValue, GPST: 26225.000000 [2022-05-31 09:17:14] GWSERIAL:82865: --> NMEA0183 message [2022-05-31 09:17:14] GWSERIAL:82866: --> NMEA0183 message [2022-05-31 09:17:14] GWSERIAL:82866: --> NMEA0183 message [2022-05-31 09:17:14] GWSERIAL:82867: --> NMEA0183 message [2022-05-31 09:17:15] GWSERIAL:83577:Drawing at PageOneValue, GPST: 26225.000000 [2022-05-31 09:17:15] GWSERIAL:83875: --> NMEA0183 message [2022-05-31 09:17:15] GWSERIAL:83876: --> NMEA0183 message [2022-05-31 09:17:15] GWSERIAL:83877: --> NMEA0183 message [2022-05-31 09:17:15] GWSERIAL:83878: --> NMEA0183 message [2022-05-31 09:17:15] GWSERIAL:83881: --> NMEA0183 message [2022-05-31 09:17:15] GWSERIAL:83883:main.cpp: GPST recovered [2022-05-31 09:17:16] GWSERIAL:84642:... OBPExtensions: GPS retrieved [2022-05-31 09:17:16] GWSERIAL:84786:Drawing at PageOneValue, GPST: 26235.000000 [2022-05-31 09:17:16] GWSERIAL:84892: --> NMEA0183 message [2022-05-31 09:17:16] GWSERIAL:84894: --> NMEA0183 message [2022-05-31 09:17:16] GWSERIAL:84896: --> NMEA0183 message [2022-05-31 09:17:17] GWSERIAL:85905: --> NMEA0183 message [2022-05-31 09:17:17] GWSERIAL:85907: --> NMEA0183 message [2022-05-31 09:17:17] GWSERIAL:85908: --> NMEA0183 message [2022-05-31 09:17:17] GWSERIAL:85994:Drawing at PageOneValue, GPST: 26235.000000 [2022-05-31 09:17:18] GWSERIAL:86917: --> NMEA0183 message [2022-05-31 09:17:18] GWSERIAL:86918: --> NMEA0183 message [2022-05-31 09:17:18] GWSERIAL:86918: --> NMEA0183 message [2022-05-31 09:17:18] GWSERIAL:87194:Drawing at PageOneValue, GPST: 26235.000000 [2022-05-31 09:17:19] GWSERIAL:87880:main.cpp: GPST invalid [2022-05-31 09:17:19] GWSERIAL:87928: --> NMEA0183 message [2022-05-31 09:17:19] GWSERIAL:87929: --> NMEA0183 message [2022-05-31 09:17:19] GWSERIAL:87931: --> NMEA0183 message [2022-05-31 09:17:19] GWSERIAL:87932: --> NMEA0183 message [2022-05-31 09:17:19] GWSERIAL:88267:... OBPExtensions: GPS lost [2022-05-31 09:17:19] GWSERIAL:88348:Drawing at PageOneValue, GPST: 26235.000000 [2022-05-31 09:17:20] GWSERIAL:88942: --> NMEA0183 message [2022-05-31 09:17:20] GWSERIAL:88943: --> NMEA0183 message [2022-05-31 09:17:20] GWSERIAL:88943: --> NMEA0183 message [2022-05-31 09:17:20] GWSERIAL:88944: --> NMEA0183 message [2022-05-31 09:17:20] GWSERIAL:89488:Drawing at PageOneValue, GPST: 26235.000000 [2022-05-31 09:17:21] GWSERIAL:89952: --> NMEA0183 message [2022-05-31 09:17:21] GWSERIAL:89953: --> NMEA0183 message [2022-05-31 09:17:21] GWSERIAL:89953: --> NMEA0183 message [2022-05-31 09:17:21] GWSERIAL:89954: --> NMEA0183 message [2022-05-31 09:17:22] GWSERIAL:90635:Drawing at PageOneValue, GPST: 26235.000000 [2022-05-31 09:17:22] GWSERIAL:90961: --> NMEA0183 message [2022-05-31 09:17:22] GWSERIAL:90963: --> NMEA0183 message [2022-05-31 09:17:22] GWSERIAL:90963: --> NMEA0183 message [2022-05-31 09:17:22] GWSERIAL:90964: --> NMEA0183 message [2022-05-31 09:17:23] GWSERIAL:91781:Drawing at PageOneValue, GPST: 26235.000000 [2022-05-31 09:17:23] GWSERIAL:91972: --> NMEA0183 message [2022-05-31 09:17:23] GWSERIAL:91973: --> NMEA0183 message [2022-05-31 09:17:23] GWSERIAL:91973: --> NMEA0183 message [2022-05-31 09:17:23] GWSERIAL:91974: --> NMEA0183 message [2022-05-31 09:17:24] GWSERIAL:92921:Drawing at PageOneValue, GPST: 26235.000000 [2022-05-31 09:17:24] GWSERIAL:92986: --> NMEA0183 message [2022-05-31 09:17:24] GWSERIAL:92987: --> NMEA0183 message [2022-05-31 09:17:24] GWSERIAL:92988: --> NMEA0183 message [2022-05-31 09:17:24] GWSERIAL:92990: --> NMEA0183 message [2022-05-31 09:17:25] GWSERIAL:93998: --> NMEA0183 message [2022-05-31 09:17:25] GWSERIAL:93999: --> NMEA0183 message [2022-05-31 09:17:25] GWSERIAL:94001: --> NMEA0183 message [2022-05-31 09:17:25] GWSERIAL:94004: --> NMEA0183 message [2022-05-31 09:17:25] GWSERIAL:94071:Drawing at PageOneValue, GPST: 26235.000000 [2022-05-31 09:17:26] GWSERIAL:95013: --> NMEA0183 message [2022-05-31 09:17:26] GWSERIAL:95014: --> NMEA0183 message [2022-05-31 09:17:26] GWSERIAL:95014: --> NMEA0183 message [2022-05-31 09:17:26] GWSERIAL:95016: --> NMEA0183 message [2022-05-31 09:17:26] GWSERIAL:95212:Drawing at PageOneValue, GPST: 26235.000000 [2022-05-31 09:17:27] GWSERIAL:96024: --> NMEA0183 message [2022-05-31 09:17:27] GWSERIAL:96025: --> NMEA0183 message [2022-05-31 09:17:27] GWSERIAL:96026: --> NMEA0183 message [2022-05-31 09:17:27] GWSERIAL:96030: --> NMEA0183 message [2022-05-31 09:17:27] GWSERIAL:96032: --> NMEA0183 message [2022-05-31 09:17:27] GWSERIAL:96095:main.cpp: GPST recovered [2022-05-31 09:17:27] GWSERIAL:96366:Drawing at PageOneValue, GPST: 26246.000000 [2022-05-31 09:17:28] GWSERIAL:97042: --> NMEA0183 message [2022-05-31 09:17:28] GWSERIAL:97043: --> NMEA0183 message [2022-05-31 09:17:28] GWSERIAL:97044: --> NMEA0183 message [2022-05-31 09:17:28] GWSERIAL:97046: --> NMEA0183 message [2022-05-31 09:17:28] GWSERIAL:97047: --> NMEA0183 message [2022-05-31 09:17:28] GWSERIAL:97515:Drawing at PageOneValue, GPST: 26247.000000 [2022-05-31 09:17:29] GWSERIAL:98056: --> NMEA0183 message [2022-05-31 09:17:29] GWSERIAL:98056: --> NMEA0183 message [2022-05-31 09:17:29] GWSERIAL:98057: --> NMEA0183 message [2022-05-31 09:17:29] GWSERIAL:98059: --> NMEA0183 message [2022-05-31 09:17:29] GWSERIAL:98060: --> NMEA0183 message [2022-05-31 09:17:29] GWSERIAL:98061: --> NMEA0183 message [2022-05-31 09:17:30] GWSERIAL:98661:Drawing at PageOneValue, GPST: 26248.000000 [2022-05-31 09:17:30] GWSERIAL:99070: --> NMEA0183 message [2022-05-31 09:17:30] GWSERIAL:99071: --> NMEA0183 message [2022-05-31 09:17:30] GWSERIAL:99073: --> NMEA0183 message [2022-05-31 09:17:30] GWSERIAL:99074: --> NMEA0183 message [2022-05-31 09:17:30] GWSERIAL:99075: --> NMEA0183 message [2022-05-31 09:17:31] GWSERIAL:99807:Drawing at PageOneValue, GPST: 26249.000000 [2022-05-31 09:17:31] GWSERIAL:100083: --> NMEA0183 message [2022-05-31 09:17:31] GWSERIAL:100083: --> NMEA0183 message [2022-05-31 09:17:31] GWSERIAL:100085: --> NMEA0183 message [2022-05-31 09:17:31] GWSERIAL:100087: --> NMEA0183 message [2022-05-31 09:17:31] GWSERIAL:100088: --> NMEA0183 message [2022-05-31 09:17:32] GWSERIAL:100952:Drawing at PageOneValue, GPST: 26250.000000 [2022-05-31 09:17:32] GWSERIAL:101096: --> NMEA0183 message [2022-05-31 09:17:32] GWSERIAL:101097: --> NMEA0183 message [2022-05-31 09:17:32] GWSERIAL:101101: --> NMEA0183 message [2022-05-31 09:17:32] GWSERIAL:101104: --> NMEA0183 message [2022-05-31 09:17:32] GWSERIAL:101106: --> NMEA0183 message [2022-05-31 09:17:33] GWSERIAL:102104:Drawing at PageOneValue, GPST: 26251.000000 [2022-05-31 09:17:33] GWSERIAL:102115: --> NMEA0183 message [2022-05-31 09:17:33] GWSERIAL:102118: --> NMEA0183 message [2022-05-31 09:17:33] GWSERIAL:102121: --> NMEA0183 message [2022-05-31 09:17:33] GWSERIAL:102126: --> NMEA0183 message [2022-05-31 09:17:34] GWSERIAL:103137: --> NMEA0183 message [2022-05-31 09:17:34] GWSERIAL:103140: --> NMEA0183 message [2022-05-31 09:17:34] GWSERIAL:103144: --> NMEA0183 message [2022-05-31 09:17:34] GWSERIAL:103146: --> NMEA0183 message [2022-05-31 09:17:34] GWSERIAL:103185:... OBPExtensions: GPS retrieved [2022-05-31 09:17:34] GWSERIAL:103326:Drawing at PageOneValue, GPST: 26253.000000 [2022-05-31 09:17:35] GWSERIAL:104160: --> NMEA0183 message [2022-05-31 09:17:35] GWSERIAL:104163: --> NMEA0183 message [2022-05-31 09:17:35] GWSERIAL:104166: --> NMEA0183 message [2022-05-31 09:17:35] GWSERIAL:104168: --> NMEA0183 message [2022-05-31 09:17:36] GWSERIAL:104556:Drawing at PageOneValue, GPST: 26255.000000 [2022-05-31 09:17:36] GWSERIAL:105178: --> NMEA0183 message [2022-05-31 09:17:36] GWSERIAL:105180: --> NMEA0183 message [2022-05-31 09:17:36] GWSERIAL:105181: --> NMEA0183 message [2022-05-31 09:17:36] GWSERIAL:105183: --> NMEA0183 message [2022-05-31 09:17:36] GWSERIAL:105184: --> NMEA0183 message [2022-05-31 09:17:37] GWSERIAL:105773:Drawing at PageOneValue, GPST: 26256.000000 [2022-05-31 09:17:37] GWSERIAL:106192: --> NMEA0183 message [2022-05-31 09:17:37] GWSERIAL:106194: --> NMEA0183 message [2022-05-31 09:17:37] GWSERIAL:106195: --> NMEA0183 message [2022-05-31 09:17:37] GWSERIAL:106197: --> NMEA0183 message [2022-05-31 09:17:37] GWSERIAL:106198: --> NMEA0183 message [2022-05-31 09:17:37] GWSERIAL:106200: --> NMEA0183 message [2022-05-31 09:17:38] GWSERIAL:106987:Drawing at PageOneValue, GPST: 26257.000000 [2022-05-31 09:17:38] GWSERIAL:107210: --> NMEA0183 message [2022-05-31 09:17:38] GWSERIAL:107212: --> NMEA0183 message [2022-05-31 09:17:38] GWSERIAL:107213: --> NMEA0183 message [2022-05-31 09:17:38] GWSERIAL:107214: --> NMEA0183 message [2022-05-31 09:17:38] GWSERIAL:107217: --> NMEA0183 message [2022-05-31 09:17:39] GWSERIAL:108201:Drawing at PageOneValue, GPST: 26258.000000 [2022-05-31 09:17:39] GWSERIAL:108226: --> NMEA0183 message [2022-05-31 09:17:39] GWSERIAL:108230: --> NMEA0183 message
W-Geronius commented 2 years ago

screenshot-video and logs covering a 'GPS no data' event at 14:08:09 UTC

raw MFD out.log NMEA0183 COM6 OBP60.log debuglevel 'log'

https://user-images.githubusercontent.com/18160302/171208790-b4e55207-9f57-4267-abb4-a0b021b79d90.mp4

wellenvogel commented 2 years ago

Not completely sure what you have logged in the raw...log. But it looks rather strange. Just only checked the RMC records. Typically there are 2 of them - with different format.

[2022-05-31 16:08:05] $GPRMC,140803.00,A,5043.910,N,700.479,E,0.4,0.0,310522,0.0,E*52
[2022-05-31 16:08:05]  $GPRMC,140804.00,A,5043.91031,N,00700.47982,E,0.470,,310522,,,A*72

Where do they come from? And at the first GPS lost

[2022-05-31 16:08:15]  GWSERIAL:470587:... OBPExtensions: GPS lost

The records are really strange:

[2022-05-31 16:08:11]  $GPRMC,140810.00,A,5043.91344,N,00700.48139,E,0.380,,310522,,,A*79
[2022-05-31 16:08:11]  $GPRMC,140810.00,A,5043.913,N,700.481,E,0.4,0.0,310522,0.0,E*54
[2022-05-31 16:08:11]  $GPRMC,140810.00,A,5043.913,N,700.481,E,0.4,0.0,310522,0.0,E*54

[2022-05-31 16:08:12]  $GPRMC,140810.00,A,5043.913,N,700.481,E,0.4,0.0,310522,0.0,E*54
[2022-05-31 16:08:13]  $GPRMC,140810.00,A,5043.913,N,700.481,E,0.4,0.0,310522,0.0,E*54

[2022-05-31 16:08:13]  $GPRMC,140810.00,A,5043.913,N,700.481,E,0.4,0.0,310522,0.0,E*54

[2022-05-31 16:08:14]  $GPRMC,140810.00,A,5043.913,N,700.481,E,0.4,0.0,310522,0.0,E*54
[2022-05-31 16:08:15]  $GPRMC,140810.00,A,5043.913,N,700.481,E,0.4,0.0,310522,0.0,E*54

[2022-05-31 16:08:17]  $GPRMC,140816.00,A,508,1.44*0C
[2022-05-31 16:08:17]  $GPRMC,140815.00,A,5043.914,N,700.482,E,,,,,*3D
[2022-05-31 16:08:17]  $GPRMC,140815.00,A,5043.914,N,700.482,E,,,,,*3D

So we see that the GPS time does not evolve, then we get an invalid record (140816) with a timestamp more in the future then the next ones. Most probably the RMC that we still see is the one that is automatically send by the core every 500 ms. But this mean that the GPS really does either not send data - or that some data is missing (buffer overflow or similar). Something really strange is the invalid RMC with 140816.00 - this is nothing we somehow generate - so could really be a problem in the GPS.

wellenvogel commented 2 years ago

BTW: Does the same happen with disabled internal GPS?

W-Geronius commented 2 years ago

thanks Andreas for jumping in!

Not completely sure what you have logged in the raw...log.

It's the MFD's TCP server 0183 output as seen on default port 10110. This seemed to be the only possibility to examine the MFD's (internal) NMEA 0183 records without disrupting the system by excessive logging.

Does the same happen with disabled internal GPS?

of course there is no 0183 output at all when internal GPS is disabled. Feeding external GPS data introduces alien hardware, software and possibly whacky data transport. That's the route I took when started to analyze this bug - the current setup can be easily reproduced by anyone

Observing the time pattern of 'no GPS data' events, I have a strong gut feeling that we are seeing the very same issue when using any external 0183 GPS sources - this favours your hypothesis of buffer overflow or alike.

RMC records. Typically there are 2 of them - with different format. Where do they come from? ... So we see that the GPS time does not evolve, then we get an invalid record (140816) with a timestamp more in the future then the next ones.

Excellent - I haven't spotted that so far. Maybe Norbert can shed some light on that as I am quite limited in understanding the tasks involved.

W-Geronius commented 2 years ago

RMC records. Typically there are 2 of them - with different format. Where do they come from? ... So we see that the GPS time does not evolve, then we get an invalid record (140816) with a timestamp more in the future then the next ones.

Just to verify I ran another test - MFD fed by Raspberry/SK/Moitessier GPS data (logs available). There is just a single format of RMC records with no records out of time order. This might indeed be an issue of the MFD internal GPS - 'no GPS data' continue to appear in the very same manner, so it's an issue not related to this

wellenvogel commented 2 years ago

Do we have logs for this second scenario?

W-Geronius commented 2 years ago

Here they are: com6 is the display's logging output, telnet is the display's complete 0183 output. I added a 'combined' file, merging log output and RMC output sorted by log time. 10.10.10.81 is the PC listening and recording the display's output:

OBP-60_logs_20220612.zip

norbert-walter commented 2 years ago

We must have bought fake China chips again. The UBlox NEO-6M is probably an ATGM332D that should be pin-compatible with the UBlox NEO-6N. The AT6558 chip is installed in the ATGM332D module. This can be recognized by the first lines of output immediately after switching on. It is quite possible that the ATGM332D shows such erratic behavior.

More details can be found here: https://www.youtube.com/watch?v=buyFIcgee5w

AT6558.pdf ATGM332D.pdf

W-Geronius commented 2 years ago

no GPS dropouts were observed during 7 days live on board using a different OBP60 with no GPS and BME280 installed. This supports Norbert's hypothesis. Occasional reboots however still occurred.

W-Geronius commented 2 years ago

In my current setup I have 2 OBP60 installed, data fed from same SK on RPi4. The device with GPS/BMP280 installed (but deactivated in config) again displays dropouts, the device without those sensors runs smoothly

norbert-walter commented 1 month ago

The problem is a software timing in the GPS data reading routine. Only all 1s read the GPS data. The data rate form GPS has the same rate. The data transmission is asynchronous and produce the problems. With al reading rate from 2 Hz is all good. The problem is fixed in the new firmware dev20240920 for the new hardware V2.1