Skip to content

Conversation

nxd010
Copy link

@nxd010 nxd010 commented Oct 5, 2025

Description

added a header to each packet with a session ID and sequence number. After the initial broadcast, receivers send NACKs (Negative Acknowledgements) listing any missing packets. The sender then re-broadcasts only those missing chunks, ensuring a complete and ordered file.

To improve flexibility, hardcoded network addresses were moved to a configuration file. The receiver now safely buffers chunks before writing to disk, preventing file corruption from out-of-order packets. This makes the broadcast fast, resilient to packet loss, and stable.

Related Issue

Fixes #3 (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Motivation and Context

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Screenshots (if appropriate):

Checklist:

  • I have registered myself at Contrihub website.
  • My code follows the code style of this project.
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • Any dependent changes have been merged and published in downstream modules
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Test Configuration:

  • Firmware version:
  • Hardware:
  • Toolchain:
  • SDK:

@nxd010
Copy link
Author

nxd010 commented Oct 5, 2025

My take on this is I have an Acknowledgment system(NACK) that checks whether all the packets have arrived or not. If not, the system says that these packets [Sequence Number] are not present and again retransmits those missing packets.

@lokesh-wagh
Copy link

could you share a video of this working also can you test this against the tcp based approach to see if your approach actually to quantize the effect of changing to your approach

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.

Fix the BroadCast File Transfer
2 participants