Fix wrong length in the LR node IDs#47
Merged
lmolina merged 5 commits intoSiliconLabs:mainfrom Apr 16, 2026
Merged
Conversation
4ec7e55 to
7452f01
Compare
|
Does |
lmolina
added a commit
that referenced
this pull request
Apr 1, 2026
lmolina
added a commit
to lmolina/zipgateway
that referenced
this pull request
Apr 1, 2026
With Z-Wave LR, the node ID change the representation from 8-bit to 16-bit. Different bugs have appear because of the incorrect or representation. Therefore, we are adding debug logs on the transport service bridge to debug and follow the correct representation of node IDs. Relates-to: ZGW-3457 Origin: SiliconLabs#47 Signed-off-by: Laudin Molina Troconis <laudin.molinatroconis@silabs.com>
lmolina
added a commit
to lmolina/zipgateway
that referenced
this pull request
Apr 1, 2026
Ensure test builds have access CMock generator by downloading it into the build folder. Relates-to: ZGW-3457 Origin: SiliconLabs#47 Signed-off-by: Laudin Molina Troconis <laudin.molinatroconis@silabs.com>
lmolina
added a commit
to lmolina/zipgateway
that referenced
this pull request
Apr 1, 2026
Transport Service ZIPGW bridge path was narrowing the node IDs from 16-bit to 8-bits. Add a standalong test that uses the flags used to build the Z/IP Gateway and avoid the specific NEW_TEST_T2, as the test would result in different `ZW_SendData_Bridge` object. Use CMock to simplify mocking and to easy eventual new tests. Relates-to: ZGW-3457 Origin: SiliconLabs#47 Signed-off-by: Laudin Molina Troconis <laudin.molinatroconis@silabs.com>
lmolina
added a commit
to lmolina/zipgateway
that referenced
this pull request
Apr 1, 2026
Transport service (TS) fails to deliver a fragmented frame it called send_data_callback_func(TRANSMIT_COMPLETE_FAIL), in this case the TS does not pop the falied session. Therefore, subsequent sends appended a fresh frame to the tail while the element in the top stales and stays in the head, causing all following commands to be re-driven through TS. Relates-to: ZGW-3457 Origin: SiliconLabs#47 Signed-off-by: Laudin Molina Troconis <laudin.molinatroconis@silabs.com>
7452f01 to
3940989
Compare
Collaborator
Author
Yes, thanks for highlighting the issue. I'll prepare a dedicated PR to address this and node ID conversion issues. |
lmolina
added a commit
to lmolina/zipgateway
that referenced
this pull request
Apr 3, 2026
Before the fix, TRANSMIT_COMPLETE_FAIL with resend_counter==0 left the session in send_data_list, causing every subsequent SEND_EVENT_SEND_NEXT_LL to re-drive the same stuck session through Transport Service. The implementation adds UNIT_TEST-guarded seam functions to ZW_SendDataAppl.c that expose private/static states. The test uses wraps to replace process_post and zw_frame_buffer_free. Choose this solution over CMock for sake of simplicity. Relates-to: ZGW-3457 Origin: SiliconLabs#47 Signed-off-by: Laudin Molina Troconis <laudin.molinatroconis@silabs.com>
lmolina
added a commit
to lmolina/zipgateway
that referenced
this pull request
Apr 3, 2026
Transport Service ZIPGW bridge path was narrowing the node IDs from 16-bit to 8-bits. Add a standalong test that uses the flags used to build the Z/IP Gateway and avoid the specific NEW_TEST_T2, as the test would result in different `ZW_SendData_Bridge` object. Use CMock to simplify mocking and to easy eventual new tests. Relates-to: ZGW-3457 Origin: SiliconLabs#47 Signed-off-by: Laudin Molina Troconis <laudin.molinatroconis@silabs.com>
lmolina
added a commit
to lmolina/zipgateway
that referenced
this pull request
Apr 3, 2026
Transport service (TS) fails to deliver a fragmented frame it called send_data_callback_func(TRANSMIT_COMPLETE_FAIL), in this case the TS does not pop the falied session. Therefore, subsequent sends appended a fresh frame to the tail while the element in the top stales and stays in the head, causing all following commands to be re-driven through TS. Relates-to: ZGW-3457 Origin: SiliconLabs#47 Signed-off-by: Laudin Molina Troconis <laudin.molinatroconis@silabs.com>
lmolina
added a commit
to lmolina/zipgateway
that referenced
this pull request
Apr 3, 2026
Before the fix, TRANSMIT_COMPLETE_FAIL with resend_counter==0 left the session in send_data_list, causing every subsequent SEND_EVENT_SEND_NEXT_LL to re-drive the same stuck session through Transport Service. The implementation adds UNIT_TEST-guarded seam functions to ZW_SendDataAppl.c that expose private/static states. The test uses wraps to replace process_post and zw_frame_buffer_free. Choose this solution over CMock for sake of simplicity. Relates-to: ZGW-3457 Origin: SiliconLabs#47 Signed-off-by: Laudin Molina Troconis <laudin.molinatroconis@silabs.com>
3d71e6a to
4418620
Compare
lmolina
added a commit
to lmolina/zipgateway
that referenced
this pull request
Apr 3, 2026
Transport Service ZIPGW bridge path was narrowing the node IDs from 16-bit to 8-bits. Add a standalong test that uses the flags used to build the Z/IP Gateway and avoid the specific NEW_TEST_T2, as the test would result in different `ZW_SendData_Bridge` object. Use CMock to simplify mocking and to easy eventual new tests. Relates-to: ZGW-3457 Origin: SiliconLabs#47 Signed-off-by: Laudin Molina Troconis <laudin.molinatroconis@silabs.com>
lmolina
added a commit
to lmolina/zipgateway
that referenced
this pull request
Apr 3, 2026
Transport service (TS) fails to deliver a fragmented frame it called send_data_callback_func(TRANSMIT_COMPLETE_FAIL), in this case the TS does not pop the falied session. Therefore, subsequent sends appended a fresh frame to the tail while the element in the top stales and stays in the head, causing all following commands to be re-driven through TS. Relates-to: ZGW-3457 Origin: SiliconLabs#47 Signed-off-by: Laudin Molina Troconis <laudin.molinatroconis@silabs.com>
lmolina
added a commit
to lmolina/zipgateway
that referenced
this pull request
Apr 3, 2026
Before the fix, TRANSMIT_COMPLETE_FAIL with resend_counter==0 left the session in send_data_list, causing every subsequent SEND_EVENT_SEND_NEXT_LL to re-drive the same stuck session through Transport Service. The implementation adds UNIT_TEST-guarded seam functions to ZW_SendDataAppl.c that expose private/static states. The test uses wraps to replace process_post and zw_frame_buffer_free. Choose this solution over CMock for sake of simplicity. Relates-to: ZGW-3457 Origin: SiliconLabs#47 Signed-off-by: Laudin Molina Troconis <laudin.molinatroconis@silabs.com>
4418620 to
59cdbf9
Compare
Collaborator
Author
|
@BugBot run |
Bugbot couldn't runBugbot is not enabled for your user on this team. Ask your team administrator to increase your team's hard limit for Bugbot seats or add you to the allowlist in the Cursor dashboard. |
Collaborator
Author
|
@BugBot run |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Reviewed by Cursor Bugbot for commit 59cdbf9. Configure here.
With Z-Wave LR, the node ID change the representation from 8-bit to 16-bit. Different bugs have appear because of the incorrect or representation. Therefore, we are adding debug logs on the transport service bridge to debug and follow the correct representation of node IDs. Relates-to: ZGW-3457 Origin: SiliconLabs#47 Signed-off-by: Laudin Molina Troconis <laudin.molinatroconis@silabs.com>
Ensure test builds have access CMock generator by downloading it into the build folder. Relates-to: ZGW-3457 Origin: SiliconLabs#47 Signed-off-by: Laudin Molina Troconis <laudin.molinatroconis@silabs.com>
Transport Service ZIPGW bridge path was narrowing the node IDs from 16-bit to 8-bits. Add a standalong test that uses the flags used to build the Z/IP Gateway and avoid the specific NEW_TEST_T2, as the test would result in different `ZW_SendData_Bridge` object. Use CMock to simplify mocking and to easy eventual new tests. Relates-to: ZGW-3457 Origin: SiliconLabs#47 Signed-off-by: Laudin Molina Troconis <laudin.molinatroconis@silabs.com>
Transport service (TS) fails to deliver a fragmented frame it called send_data_callback_func(TRANSMIT_COMPLETE_FAIL), in this case the TS does not pop the falied session. Therefore, subsequent sends appended a fresh frame to the tail while the element in the top stales and stays in the head, causing all following commands to be re-driven through TS. Relates-to: ZGW-3457 Origin: SiliconLabs#47 Signed-off-by: Laudin Molina Troconis <laudin.molinatroconis@silabs.com>
Before the fix, TRANSMIT_COMPLETE_FAIL with resend_counter==0 left the session in send_data_list, causing every subsequent SEND_EVENT_SEND_NEXT_LL to re-drive the same stuck session through Transport Service. The implementation adds UNIT_TEST-guarded seam functions to ZW_SendDataAppl.c that expose private/static states. The test uses wraps to replace process_post and zw_frame_buffer_free. Choose this solution over CMock for sake of simplicity. Relates-to: ZGW-3457 Origin: SiliconLabs#47 Signed-off-by: Laudin Molina Troconis <laudin.molinatroconis@silabs.com>
59cdbf9 to
3df7e92
Compare
lmolina
added a commit
that referenced
this pull request
Apr 16, 2026
With Z-Wave LR, the node ID change the representation from 8-bit to 16-bit. Different bugs have appear because of the incorrect or representation. Therefore, we are adding debug logs on the transport service bridge to debug and follow the correct representation of node IDs. Relates-to: ZGW-3457 Origin: #47 Signed-off-by: Laudin Molina Troconis <laudin.molinatroconis@silabs.com>
lmolina
added a commit
that referenced
this pull request
Apr 16, 2026
Ensure test builds have access CMock generator by downloading it into the build folder. Relates-to: ZGW-3457 Origin: #47 Signed-off-by: Laudin Molina Troconis <laudin.molinatroconis@silabs.com>
lmolina
added a commit
that referenced
this pull request
Apr 16, 2026
Transport Service ZIPGW bridge path was narrowing the node IDs from 16-bit to 8-bits. Add a standalong test that uses the flags used to build the Z/IP Gateway and avoid the specific NEW_TEST_T2, as the test would result in different `ZW_SendData_Bridge` object. Use CMock to simplify mocking and to easy eventual new tests. Relates-to: ZGW-3457 Origin: #47 Signed-off-by: Laudin Molina Troconis <laudin.molinatroconis@silabs.com>
lmolina
added a commit
that referenced
this pull request
Apr 16, 2026
Transport service (TS) fails to deliver a fragmented frame it called send_data_callback_func(TRANSMIT_COMPLETE_FAIL), in this case the TS does not pop the falied session. Therefore, subsequent sends appended a fresh frame to the tail while the element in the top stales and stays in the head, causing all following commands to be re-driven through TS. Relates-to: ZGW-3457 Origin: #47 Signed-off-by: Laudin Molina Troconis <laudin.molinatroconis@silabs.com>
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.

Note
Medium Risk
Changes core transport send/callback behavior and widens
ZW_SendData_Bridgenode ID types to 16-bit, which could impact TX queue advancement and bridge transmissions if assumptions elsewhere still use 8-bit IDs.Overview
Fixes Long Range node ID truncation by updating the ZIPGW Transport Service
ZW_SendData_Bridgeprototype to take 16-bit source/destination node IDs and adds a regression test to ensure LR destination IDs (e.g., 257) are preserved through the TS send path.Adjusts
ZW_SendDataAppllow-level callback handling soTRANSMIT_COMPLETE_FAILpops/frees the current session and postsSEND_EVENT_SEND_NEXT_LLwhen no resend is pending, preventing the queue from stalling; addsUNIT_TESTseam helpers plus a dedicated unit test for this failure/resend behavior.Extends the test build to support on-demand CMock-based mock regeneration (downloads/verifies CMock, runs Ruby generator) and adds
rubyto the build dependencies, including a small Unity compatibility shim for legacy CMock detail macros.Reviewed by Cursor Bugbot for commit 59cdbf9. Bugbot is set up for automated code reviews on this repo. Configure here.