In the process of chasing down dropped NMEA messages I noticed that the PyGPSClient VMS memory usage grows. A few times it will take a step down, but the trend is upward. I wrote a python script to check the process ID for PyGPSClient every second and report any changes in VMS usage. Here is a sample:
Time, vms memory usage kB, delta memory usage kB
22:36:57 88232 88232 Initial startup
22:37:14 88368 136
22:37:29 88968 600
22:37:37 89100 132
22:37:49 162908 73808 Started rover
22:37:50 163316 408
22:37:52 163456 140
22:37:57 163596 140.
22:38:02 163732 136
22:38:08 163876 144
22:38:13 164008 132
22:38:19 164148 140
22:38:24 164280 132
22:38:30 164424 144
22:38:36 164568 144
22:38:41 164704 136
22:38:45 164840 136
22:38:47 165152 312
22:38:48 165308 156
22:40:04 165444 136
22:40:09 165576 132
22:40:15 165716 140
22:40:20 165848 132
22:40:26 165984 136
22:40:32 166132 148
22:40:38 166272 140
22:40:43 166416 144
22:40:49 166552 136
22:40:54 166684 132
22:40:59 166824 140
22:41:05 166960 136
22:41:11 167100 140
22:41:16 167232 132
22:41:22 167376 144
22:41:26 168400 1024
22:41:27 168536 136
22:41:33 168676 140
22:41:39 168820 144
22:41:44 168956 136
... to the next morning
10:56:52 313276 148
11:00:05 313412 136
11:03:28 313552 140
11:07:40 314576 1024
11:15:56 315600 1024
11:24:52 316624 1024
Here's a plot for the entire run:
I've had similar but not identical results using a Pi400, Pi4 and a Pi5 with a u-blox ZED-F9P and with Quectel LC29HDA and LC29HBS.
For the Pi400 and Pi4 I ran tests where I tried to eliminate other possible interference sources. I used a fresh install of the OS Trixie on the SD card followed by an install of PyGPSClient using the instructions at https://github.com/semuconsulting/pyubx2. I started PyGPSClient, then started the python script that tracked VM usage. I closed the map and satellite views and turned on the datalog using binary. After setting the data rate (9600 for ZED-F9P and 115200 for LC29) I connected to the GPS receiver. No other defaults were changed. The downlink rate was 1 Hz. I've checked and the CPU does not seem to be loaded at all (although I wouldn't likely see short bursts). Most of the time I run headless, but for the Pi400 case with fresh install I did not use VNC.
The memory usage was one consistent characteristic I could easily record. I've also seen:
Dropped NMEA messages that get worse over time. I had a run that lasted 46288 seconds. I scanned for time tags in GNRMC or GNGGA (either one or both) and found 19852 time tags. A plot showing the time between time tags for one case is:
In another case I had the scatter plots set with a 100 point average. In a 12 hour run I'd expect over 400 points, but only 33 were recorded. But in looking at log files I have never seen a message dropout rate that high so I think something else is going on.
Slow display updates (console display would update every 2 seconds or longer) and slow response to the mouse. I closed the map view and the console refresh rate went to normal. Reopened the map view and the console refresh rate stayed normal. Another time undocking the settings also made the console refresh rate go to normal. Looking at a run going now, the console is refreshing every 7 seconds. I opened the server config window. When I click on the close icon nothing happens until just before the console display refreshes.
Very infrequent warnings "Error parsing data stream Serial stream terminated unexpectedly. Line requested, xx bytes returned". Sometimes the error is on the checksum. I "think" this happens mostly or possibly only when the baud rate is 115200.
Also very infrequently the log looks like:
$GBGSV,2,1,07,13,59,159,22,27,39,311,19,28,79,249,09,33,75,031,19,17F
$GBGSV,2,2,07,38,33,151,21,41,50,236,13,42,19,047,23,145
$GQGSV,1,1,00,064
$GNGST,192253.00,57,27,13,98,5.3,11,1541
µb
1$��+))+)'()(+))-,+++,----3/12U5G95;225C85848?9@DABCGEHJLNRRXZ_fjnsx}ÅÇÑÑäñíçççåäãããåàâââàâÜáåÖÜÜÖÑÑÑÑÜàçëííäåååçåççéåçéããççèúîëèèèëèééèéçãäââäâàâàààäâââáâââçñåàáàáàäâääââäãåããäââàáÖÖÅ�~ywvtpmic]WVÄOD@=;<:897865344431622/303----,1.+,+*+++*)*)***(()()()( °� °�Ç≥a^-+,,/,.-.-00/0114436899>;;<?>ADGFEFHMKLNQOQRSTYWY\[]dlltjklqvÖ�yx{~~ÉâÖÖÑÖÜâåççñåääåíèéåçéèî§úîíëíîìòòîîîññòúõõõõúõû†õõòóòòùúîìííëìïìììììïïôóîóïñïóôóîîîììôóíëìêéèåçãäâáÜÖÜÇÄ}z|{~ê®é}vusuxqoijfdcb_[ZXVUVSNLIFFEDBA>===;;7764533132//0.//--.,.9,,-++,,,+,+),** °� °�j⁄ÙH'%ä$GNRMC,192254.00,A,3851.4242490,N,12116.8037205,W,0.227,,130726,,,A,V05
$GNGGA,192254.00,3851.4242490,N,12116.8037205,W,1,08,1.40,72.129,M,-26.730,M,,4A
$GNGSA,A,3,10,24,27,18,23,,,,,,,,3.01,1.40,2.66,10E
$GNGSA,A,3,81,,,,,,,,,,,,3.01,1.40,2.66,20E
$GNGSA,A,3,,,,,,,,,,,,,3.01,1.40,2.66,306
$
Desktop (please complete the following information):
Raspberry Pi Trixie OS, Bookworm on some of the earlier runs.
Raspberry Pi 400, Pi 4 and Pi 5. The Pi 400 and Pi 4 were running from SD card. The Pi5 has a NVMe installed in a hat.
Python 3.13.5
USB connection
u-blox ZED-F9P, Quectel LC29HDAN and LC29HBS
I don't have the firmware versions or protocols but I will work on getting them if it would help.
The challenge is that the problem is not consistent. Some times there are no (or very few) messages dropped. I'm working on compiling a set of tests that systematically tests:
1-GPS receiver (probably won't use the base station)
2-receiver baud rate
3-computer
4-PyGPSClient setup (minimal vs maximum windows open, no log, binary log, parsed log)
5- headless vs hard wired display.
I'm happy to run any test cases if that would help. The challenge is that it takes several hours for some of the characteristics to show up. I can log the memory usage and use the data log to detect dropped messages. But I haven't been able to figure out how to detect the refresh slowdown without looking at it. Or even if it is a useful symptom to measure.
I added just about everything that I saw. I hope that some of it will be useful. I expect that some of the symptoms are red herrings, I just don't know which.
In the process of chasing down dropped NMEA messages I noticed that the PyGPSClient VMS memory usage grows. A few times it will take a step down, but the trend is upward. I wrote a python script to check the process ID for PyGPSClient every second and report any changes in VMS usage. Here is a sample:
Time, vms memory usage kB, delta memory usage kB
22:36:57 88232 88232 Initial startup
22:37:14 88368 136
22:37:29 88968 600
22:37:37 89100 132
22:37:49 162908 73808 Started rover
22:37:50 163316 408
22:37:52 163456 140
22:37:57 163596 140.
22:38:02 163732 136
22:38:08 163876 144
22:38:13 164008 132
22:38:19 164148 140
22:38:24 164280 132
22:38:30 164424 144
22:38:36 164568 144
22:38:41 164704 136
22:38:45 164840 136
22:38:47 165152 312
22:38:48 165308 156
22:40:04 165444 136
22:40:09 165576 132
22:40:15 165716 140
22:40:20 165848 132
22:40:26 165984 136
22:40:32 166132 148
22:40:38 166272 140
22:40:43 166416 144
22:40:49 166552 136
22:40:54 166684 132
22:40:59 166824 140
22:41:05 166960 136
22:41:11 167100 140
22:41:16 167232 132
22:41:22 167376 144
22:41:26 168400 1024
22:41:27 168536 136
22:41:33 168676 140
22:41:39 168820 144
22:41:44 168956 136
... to the next morning
10:56:52 313276 148
11:00:05 313412 136
11:03:28 313552 140
11:07:40 314576 1024
11:15:56 315600 1024
11:24:52 316624 1024
Here's a plot for the entire run:
I've had similar but not identical results using a Pi400, Pi4 and a Pi5 with a u-blox ZED-F9P and with Quectel LC29HDA and LC29HBS.
For the Pi400 and Pi4 I ran tests where I tried to eliminate other possible interference sources. I used a fresh install of the OS Trixie on the SD card followed by an install of PyGPSClient using the instructions at https://github.com/semuconsulting/pyubx2. I started PyGPSClient, then started the python script that tracked VM usage. I closed the map and satellite views and turned on the datalog using binary. After setting the data rate (9600 for ZED-F9P and 115200 for LC29) I connected to the GPS receiver. No other defaults were changed. The downlink rate was 1 Hz. I've checked and the CPU does not seem to be loaded at all (although I wouldn't likely see short bursts). Most of the time I run headless, but for the Pi400 case with fresh install I did not use VNC.
The memory usage was one consistent characteristic I could easily record. I've also seen:
Dropped NMEA messages that get worse over time. I had a run that lasted 46288 seconds. I scanned for time tags in GNRMC or GNGGA (either one or both) and found 19852 time tags. A plot showing the time between time tags for one case is:
In another case I had the scatter plots set with a 100 point average. In a 12 hour run I'd expect over 400 points, but only 33 were recorded. But in looking at log files I have never seen a message dropout rate that high so I think something else is going on.
Slow display updates (console display would update every 2 seconds or longer) and slow response to the mouse. I closed the map view and the console refresh rate went to normal. Reopened the map view and the console refresh rate stayed normal. Another time undocking the settings also made the console refresh rate go to normal. Looking at a run going now, the console is refreshing every 7 seconds. I opened the server config window. When I click on the close icon nothing happens until just before the console display refreshes.
Very infrequent warnings "Error parsing data stream Serial stream terminated unexpectedly. Line requested, xx bytes returned". Sometimes the error is on the checksum. I "think" this happens mostly or possibly only when the baud rate is 115200.
Also very infrequently the log looks like:
$GBGSV,2,1,07,13,59,159,22,27,39,311,19,28,79,249,09,33,75,031,19,17F
$GBGSV,2,2,07,38,33,151,21,41,50,236,13,42,19,047,23,145
$GQGSV,1,1,00,064
$GNGST,192253.00,57,27,13,98,5.3,11,1541
µb
1$��+))+)'()(+))-,+++,----3/12U5G95;225C85848?9@DABCGEHJLNRRXZ_fjnsx}ÅÇÑÑäñíçççåäãããåàâââàâÜáåÖÜÜÖÑÑÑÑÜàçëííäåååçåççéåçéããççèúîëèèèëèééèéçãäââäâàâàààäâââáâââçñåàáàáàäâääââäãåããäââàáÖÖÅ�~ywvtpmic
]WVÄOD@=;<:897865344431622/303----,1.+,+*+++*)*)***(()()()( °� °�Ç≥a^-+,,/,.-.-00/0114436899>;;<?>ADGFEFHMKLNQOQRSTYWY\[]dlltjklqvÖ�yx{~~ÉâÖÖÑÖÜâåççñåääåíèéåçéèî§úîíëíîìòòîîîññòúõõõõúõû†õõòóòòùúîìííëìïìììììïïôóîóïñïóôóîîîììôóíëìêéèåçãäâáÜÖÜÇÄ}z|{~ê®é}vusuxqoijfdcb_[ZXVUVSNLIFFEDBA>===;;7764533132//0.//--.,.9,,-++,,,+,+),** °� °�j⁄ÙH'%ä$GNRMC,192254.00,A,3851.4242490,N,12116.8037205,W,0.227,,130726,,,A,V05$GNGGA,192254.00,3851.4242490,N,12116.8037205,W,1,08,1.40,72.129,M,-26.730,M,,4A
$GNGSA,A,3,10,24,27,18,23,,,,,,,,3.01,1.40,2.66,10E
$GNGSA,A,3,81,,,,,,,,,,,,3.01,1.40,2.66,20E
$GNGSA,A,3,,,,,,,,,,,,,3.01,1.40,2.66,306
$
Desktop (please complete the following information):
Raspberry Pi Trixie OS, Bookworm on some of the earlier runs.
Raspberry Pi 400, Pi 4 and Pi 5. The Pi 400 and Pi 4 were running from SD card. The Pi5 has a NVMe installed in a hat.
Python 3.13.5
USB connection
u-blox ZED-F9P, Quectel LC29HDAN and LC29HBS
I don't have the firmware versions or protocols but I will work on getting them if it would help.
The challenge is that the problem is not consistent. Some times there are no (or very few) messages dropped. I'm working on compiling a set of tests that systematically tests:
1-GPS receiver (probably won't use the base station)
2-receiver baud rate
3-computer
4-PyGPSClient setup (minimal vs maximum windows open, no log, binary log, parsed log)
5- headless vs hard wired display.
I'm happy to run any test cases if that would help. The challenge is that it takes several hours for some of the characteristics to show up. I can log the memory usage and use the data log to detect dropped messages. But I haven't been able to figure out how to detect the refresh slowdown without looking at it. Or even if it is a useful symptom to measure.
I added just about everything that I saw. I hope that some of it will be useful. I expect that some of the symptoms are red herrings, I just don't know which.