H firmware fix - #12
Open
azebro wants to merge 30 commits into
Open
Conversation
Co-authored-by: azebro <1090464+azebro@users.noreply.github.com>
Co-authored-by: azebro <1090464+azebro@users.noreply.github.com>
Co-authored-by: azebro <1090464+azebro@users.noreply.github.com>
Co-authored-by: azebro <1090464+azebro@users.noreply.github.com>
Co-authored-by: azebro <1090464+azebro@users.noreply.github.com>
Co-authored-by: azebro <1090464+azebro@users.noreply.github.com>
Co-authored-by: azebro <1090464+azebro@users.noreply.github.com>
Co-authored-by: azebro <1090464+azebro@users.noreply.github.com>
Co-authored-by: azebro <1090464+azebro@users.noreply.github.com>
Co-authored-by: azebro <1090464+azebro@users.noreply.github.com>
Co-authored-by: azebro <1090464+azebro@users.noreply.github.com>
Co-authored-by: azebro <1090464+azebro@users.noreply.github.com>
Co-authored-by: azebro <1090464+azebro@users.noreply.github.com>
Co-authored-by: azebro <1090464+azebro@users.noreply.github.com>
Co-authored-by: azebro <1090464+azebro@users.noreply.github.com>
Co-authored-by: azebro <1090464+azebro@users.noreply.github.com>
Co-authored-by: azebro <1090464+azebro@users.noreply.github.com>
Co-authored-by: azebro <1090464+azebro@users.noreply.github.com>
Co-authored-by: azebro <1090464+azebro@users.noreply.github.com>
Co-authored-by: azebro <1090464+azebro@users.noreply.github.com>
Co-authored-by: azebro <1090464+azebro@users.noreply.github.com>
- Created REVIEW.md to detail architecture and implementation review findings, including missing functionality, interface mismatches, and bugs. - Established action items for critical and important issues to address in the Python port. - Added REVIEW_FOLLOWUP.md to summarize the resolution of action items, confirming all critical and important issues were fixed, with increased test coverage. - Implemented test_observer_state.py to validate Observer and PersistentState integration, covering state serialization, enumeration state machine, and node table accumulation. - Introduced test_received_packets.py to ensure proper functioning of the ReceivedPackets iterator, including edge cases and error handling.
- Introduced tests for the public API in `test_api.py`, validating parser creation, byte parsing, connection handling, versioning, and accessibility of exports. - Added tests for barcode encoding/decoding in `test_barcode.py`, covering known addresses, roundtrip encoding/decoding, error handling, and convenience functions. - Implemented CRC-16-CCITT tests in `test_crc.py`, ensuring correct CRC calculations for various input scenarios. - Developed comprehensive tests for the protocol parser in `test_parser.py`, including frame accumulation, CRC error handling, enumeration sequence processing, and parser state management. - Created tests for protocol types in `test_types.py`, validating GatewayID, Address, FrameType, SlotCounter, and PowerReport functionalities, including edge cases and expected behaviors.
Complete Python port of Tigo TAP protocol observer
- Updated the ReceiveResponse class in Python and Rust to remove the strict check for status_type bits 5-7, allowing for proper parsing of H-firmware responses. - Added unit tests for various H-firmware status types to ensure correct handling of optional fields. - Documented the differences in status byte handling between G and H firmware in the new tigo_parsing.md file. - Adjusted TCP keepalive configuration comments for clarity regarding platform compatibility.
- Documented known frame types and their statuses. - Detailed the RECEIVE_RESPONSE status byte differences across firmware versions. - Identified and described various packet types in the PV application layer. - Provided insights into unknown fields in COMMAND_REQUEST and RECEIVE_REQUEST payloads. - Included detailed formats for power reports and PV configuration requests/responses. - Captured live observations and hypotheses for further investigation.
- Documented known frame types and their statuses. - Detailed the RECEIVE_RESPONSE status byte differences across firmware versions. - Identified and described various packet types in the PV application layer. - Provided insights into unknown fields in COMMAND_REQUEST and RECEIVE_REQUEST payloads. - Included detailed formats for power reports and PV configuration requests/responses. - Captured live observations and hypotheses for further investigation.
- Added new frame types: ENUMERATION_END_RESPONSE_2 (0x0E03), CHANNEL_QUERY_REQUEST (0x000E), and CHANNEL_QUERY_RESPONSE (0x000F) with detailed payload descriptions. - Clarified byte[0] behavior as a super-epoch counter, including its cycling pattern and significance. - Updated unknown_a and unknown_b fields to reflect constant values observed across all TAPs. - Introduced extended 15-byte format for power reports, detailing new fields and their meanings. - Documented live capture sessions, highlighting new discoveries and frame types, including the CCA boot sequence and PV_CONFIG_REQ response types. - Added observations on node firmware variants and topology report decoding with next-hop routing.
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.
This pull request introduces Python ports of the TapTap protocol, improves documentation, and fixes critical protocol parsing issues with H-firmware gateways. The most important changes are grouped below by theme:
Protocol Parsing Fixes:
status_type & 0x00E0validation that previously rejected most responses from H-firmware gateways, ensuring power reports are no longer silently dropped.docs/protocol.mdto clarify that only bits 0-4 of the status type determine payload structure, and bits 5-7 are firmware-dependent flags with no effect on payload structure, including new examples for both G- and H-firmware formats. [1] [2] [3] [4]Platform and Configuration Improvements:
with_retries()configuration now correctly excludes Windows, where the API is unavailable.Documentation Enhancements:
docs/implementation/00-overview.md, detailing TapTap's architecture, data flow, module organization, design patterns, and testing strategy for both Rust and Python ports.README.mdto announce and document two new Python ports:pytap(simplified parser) andtaptap-python(full protocol port), with installation instructions and feature summaries. [1] [2]General Documentation Updates:
docs/protocol.mdandCHANGELOG.mdto document H-firmware status type format and parsing changes. [1] [2]These changes collectively improve protocol compatibility, expand accessibility via Python, and provide clearer documentation for both users and developers.