Skip to content

Conversation

@Cisien
Copy link

@Cisien Cisien commented Jan 25, 2026

This change counts when readData returns an err code other than RADIOLIB_ERR_NONE. This will be a CRC error in most cases, with edge cases such as bad radio settings also incrementing this. A CRC error would be caused by conditions such as collisions, interference, and weak signals.

This counter is exposed in the stats-packets command, and in the repeater stats payload as 4 additional bytes added to the end of the structure. The app handles this gracefully.

My incompetent robot claims the total payload size is 96 bytes (unverified but probably close).

I intend to use this field in the LetsMesh analyzer to get a better idea of how much impact my repeaters are seeing from collisions/interference.

This change counts when readData returns an err code other than RADIOLIB_ERR_NONE. In most cases this is going to be a CRC error. This counter is exposed in the `stats-packets` command, and in the repeater stats payload (4 additional bytes to the payload, which is now 56 bytes with this change. My incompetent robot claims the total payload size is 96 bytes (unverified but probably close).
Copy link
Contributor

@oltaco oltaco left a comment

Choose a reason for hiding this comment

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

Looks good to me, apart from my minor nitpick but that might just be me being pedantic :)

void loop() override;

uint32_t getPacketsRecv() const { return n_recv; }
uint32_t getPacketsRecvErrors() const { return n_recv_errors; }
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor nitpick, should this be getPacketRecvErrors() ?

@oltaco
Copy link
Contributor

oltaco commented Jan 26, 2026

Nice, I've been wondering about adding this for a while now. Since our local mesh has grown I'm now seeing a non-negligible amount of -707 in the serial log while doing testing and this would be a great addition to track.

@ripplebiz ripplebiz merged commit 4b7684c into meshcore-dev:dev Jan 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants