I’ve been studying the LOOP errors for over a year now. I see them on three different installs, 1 NUC7i5 (w/ console) and two Raspberry Pi 4s (1 w/ console, 1 w/ envoy).
I’ve got a modified and instrumented driver. The important mod is to exit genDavisLoopPackets() when the error is hit. The error is almost always “Expected to read 99 chars; got 0 instead”, but it does not have to be 0 that was actually received. I you don’t exit out of that loop, and you don’t get lucky to be near the end of the loop, weewx will restart. With the change, weewx never restarts.
Next is the question of why. It may very well be what Tom suggests. I’ve suspected as such and have been meaning to write a C program to read the serial (USB) port and feed weewx.
One thing I can say is that, for me, ON ALL THREE consoles, the error occurs *almost* always after a time set.
Here’s an example from the log:
Vantage Clock Set/Short Reads Info:
Dec 12 00:30:04 judy weewx[491] INFO user.vantagenext: Clock set to 2021-12-12 00:30:06 PST (1639297806) (9128, 1639297804.599486, 1.303189)
Dec 12 00:30:09 judy weewx[491] INFO user.vantagenext: get_packet returned 0 bytes. (9129)
Dec 12 00:30:13 judy weewx[491] INFO user.vantagenext: get_packet returned 0 bytes. (9130)
Dec 12 00:30:23 judy weewx[491] INFO user.vantagenext: get_packet returned 0 bytes. (9134)
Dec 12 00:30:27 judy weewx[491] INFO user.vantagenext: get_packet returned 0 bytes. (9135)
Dec 12 00:30:31 judy weewx[491] INFO user.vantagenext: get_packet returned 0 bytes. (9136)
Dec 12 00:30:35 judy weewx[491] INFO user.vantagenext: get_packet returned 0 bytes. (9137)
Dec 12 00:30:39 judy weewx[491] INFO user.vantagenext: get_packet returned 0 bytes. (9138)
Dec 12 00:30:44 judy weewx[491] INFO user.vantagenext: get_packet returned 0 bytes. (9139)
Dec 12 00:30:49 judy weewx[491] INFO user.vantagenext: get_packet returned 0 bytes. (9141)
In the above, when the clock set happened, the driver had served 9128 successful loop packets. It served one more after the clock set and then got the zero bytes error (9129). The same is true for the next, one success and then one error. After that, 4 successes and one error. And so on.
Sometimes after a time set, I see no errors, but that is not often. The number of errors varies. This is on the high side. 1 - 4 errors might be more common.
Sometimes there is an error that occurs NOT after the time set. This is very rare and, when it does happen, it is very often an error that I see on all three consoles. And, when it does occur, it’s always a single error.
I’m still studying this (because it bothers the heck out of me).