Skip to content

Support current MeshCore packet log formats#37

Open
robekl wants to merge 1 commit intoCisien:mainfrom
robekl:fix-current-log-format-support
Open

Support current MeshCore packet log formats#37
robekl wants to merge 1 commit intoCisien:mainfrom
robekl:fix-current-log-format-support

Conversation

@robekl
Copy link
Copy Markdown

@robekl robekl commented Mar 21, 2026

Summary

  • accept current repeater packet logs that do not include hash=
  • keep support for dispatcher/serial packet logs that include time= and hash=
  • document the supported MeshCore log variants more precisely

Validation

  • python -m pytest tests/test_message_parser.py tests/test_topics.py tests/test_config_loader.py

@Cisien
Copy link
Copy Markdown
Owner

Cisien commented Mar 23, 2026

Can you clarify the case when the hash field is not present?

@robekl
Copy link
Copy Markdown
Author

robekl commented Mar 24, 2026

Can you clarify the case when the hash field is not present?

Yes. The “hash not present” case is the current repeater packet log format emitted by MeshCore itself, not a malformed line.

Looking at current MeshCore source, the repeater packet logger writes lines like:

RX, len=... (type=..., route=..., payload_len=...) SNR=... RSSI=... score=... [src -> dst]

and it does not compute or print hash= in that code path. The dispatcher/serial logger is a different path and still explicitly calculates and appends hash=... (and time=...).

So when hash is missing, the cause is typically just that the packet came from the repeater/file logging format rather than the dispatcher/serial logging format. In that case the parser should still accept the packet and publish it normally; hash is simply unavailable from the source log, so the published payload leaves it unset / null.

This is why the PR makes hash optional rather than treating its absence as an error.

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.

2 participants