Fix NHS serial framing for embedded packet markers - #3597
Open
Challado wants to merge 5 commits into
Open
Conversation
Honor the packet length declared at byte 1 so embedded 0xFF and 0xFE payload bytes do not restart or truncate valid frames. Preserve partial packet state across serial-read timeouts and validate the declared length and final marker before dispatch. Add the compatibility initialization request, model description override, protocol metadata and per-model bypass alarm behavior. Correct the published input voltage extrema and document the changes. Signed-off-by: Lucas Bocchi <lucas.bocchi@gmail.com>
|
A ZIP file with standard source tarball and another tarball with pre-built docs for commit 07f929c is temporarily available: NUT-tarballs-PR-3597.zip. |
Initialize protocol and bypass metadata explicitly for every known model so Clang's missing-field check remains clean. Add a documented defensive default to the initialization selector and teach the documentation spell checker the hexadecimal xFE token. Signed-off-by: Lucas Bocchi <lucas.bocchi@gmail.com>
Check the HWINFO checksum in its interpreter and publish the documented lower-case battery charger states. Log already-known HWINFO packets quietly and expose rejected frames through raw packet debugging. Credit the packet captures and follow-up analysis contributed in issue networkupstools#3592 directly beside the affected code and in the release notes. Suggested-by: Free Churro <freechurrosnet@gmail.com> Signed-off-by: Lucas Bocchi <lucas.bocchi@gmail.com>
|
✅ Build nut 2.8.5.5157-master completed (commit 2ba23fbcdb by @Challado)
|
Signed-off-by: Lucas Bocchi <lucas.bocchi@gmail.com>
|
✅ Build nut 2.8.5.5158-master completed (commit e5671c0355 by @Challado)
|
Pass the packet data, byte count and serial descriptor directly to the helper. Keep serial validation, reopening, write checks and diagnostics inside the helper so the initialization calls are easier to read. Signed-off-by: Lucas Bocchi <lucas.bocchi@gmail.com>
|
✅ Build nut 2.8.5.5159-master completed (commit e3c2ed0f4d by @Challado)
|
|
❌ Build nut 2.8.5.5160-master failed (commit b0c094b29b by @Challado) |
|
✅ Build nut 2.8.5.5162-master completed (commit f2bb41152b by @Challado)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
0xFFand0xFEinside packet payloadsNEWS.adocTesting
Hardware validation is requested from the reporter of #3592, who supplied captures demonstrating valid 18-byte and 50-byte HWINFO frames containing
0xFFin the payload.Fixes #3592