{"id":39557866,"url":"https://github.com/vdesmond/arq-protocols","last_synced_at":"2026-01-18T07:02:18.236Z","repository":{"id":174469002,"uuid":"351876393","full_name":"vdesmond/arq-protocols","owner":"vdesmond","description":"Implementation of Automatic Repeat reQuest (ARQ) protocols in python","archived":false,"fork":false,"pushed_at":"2021-05-12T18:07:19.000Z","size":2172,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-01-29T20:25:44.968Z","etag":null,"topics":["arq","arq-protocols","simulation"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vdesmond.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-03-26T18:25:52.000Z","updated_at":"2023-06-11T16:10:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"a2219d50-2455-4908-9d51-20e644653541","html_url":"https://github.com/vdesmond/arq-protocols","commit_stats":{"total_commits":32,"total_committers":2,"mean_commits":16.0,"dds":0.0625,"last_synced_commit":"11fbf1507ff2efe8f58a1af46c75ef756e6f44ec"},"previous_names":["vdesmond/arq-protocols"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vdesmond/arq-protocols","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vdesmond%2Farq-protocols","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vdesmond%2Farq-protocols/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vdesmond%2Farq-protocols/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vdesmond%2Farq-protocols/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vdesmond","download_url":"https://codeload.github.com/vdesmond/arq-protocols/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vdesmond%2Farq-protocols/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28532592,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arq","arq-protocols","simulation"],"created_at":"2026-01-18T07:02:17.549Z","updated_at":"2026-01-18T07:02:18.231Z","avatar_url":"https://github.com/vdesmond.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# arq-protocols (and other stuff)\n\nThis repository contains implementation of 3 protocols:\n\n- Stop and Wait ARQ\n- Go Back N ARQ\n- Selective Repeat ARQ\n\nAnd also some bonus stuff including:\n\n- CSMA/CA Simulation\n\n### How to run\n\n1. Clone this repository\n2. *(optional)* Create a virtual environment before running.\n   1. Install some additional python packages: ```pip install coloredlogs verboselogs```\n   2. If you want to use the logging module only, you can modify the code under ```# Configure Logging``` for every file.\n3. Run sender and receiver in seperate tabs/windows.\n4. The command line arguments are as follows:\u003cbr\u003e\u003c/br\u003e\n   1. **Stop and Wait ARQ**\u003cbr\u003eSender: ```python sw_sender.py \u003cPORT\u003e \u003cLOSS_PROB\u003e \u003cACK_TIMEOUT\u003e \u003cMESSAGE\u003e```\u003c/br\u003eReceiver: ```python sw_receiver.py \u003cPORT\u003e \u003cLOSS_PROB\u003e```\u003c/br\u003e\u003cbr\u003e\n   2. **Go Back N ARQ**\u003cbr\u003eSender: ```python gbn_sender.py \u003cPORT\u003e \u003cSEQ_NO_BIT_WIDTH\u003e \u003cLOSS_PROB\u003e \u003cACK_TIMEOUT\u003e \u003cMESSAGE\u003e```\u003c/br\u003eReceiver: ```python gbn_receiver.py \u003cPORT\u003e \u003cSEQ_NO_BIT_WIDTH\u003e \u003cLOSS_PROB\u003e```\u003c/br\u003e\u003cbr\u003e\n   3. **Selective Repeat ARQ**\u003cbr\u003eSender: ```python sr_sender.py \u003cPORT\u003e \u003cSEQ_NO_BIT_WIDTH\u003e \u003cLOSS_PROB\u003e  \u003cACK_TIMEOUT\u003e \u003cMESSAGE\u003e```\u003c/br\u003eReceiver: ```python sr_receiver.py \u003cPORT\u003e \u003cSEQ_NO_BIT_WIDTH\u003e \u003cLOSS_PROB\u003e```\u003c/br\u003e\u003cbr\u003e\n   4. **CSMA/CA Simulation**\u003cbr\u003eCSMA/CA has been implemented on top of Stop and Wait ARQ\u003cbr\u003eSender station: ```python sender_station.py \u003cPORT\u003e \u003cLOSS_PROB\u003e  \u003cACK_TIMEOUT\u003e \u003cCHANNEL_BUSY_PROB\u003e \u003cIFS\u003e \u003cMAX_K\u003e \u003cMESSAGE\u003e```\u003c/br\u003eBase Station: ```python base_station.py \u003cPORT\u003e \u003cLOSS_PROB\u003e```\u003c/br\u003e\n\n### Additional Notes\n\n- Make sure ```PORT``` and ```SEQ_NO_BIT_WIDTH``` is same for both sender and receiver\n- ```ACK_TIMEOUT``` is in milliseconds.\n- The window length for Go Back N and Selective Repeat ARQ is calculated as ```(2 ** SEQ_NO_BIT_WIDTH) - 1``` and ```2 ** (SEQ_NO_BIT_WIDTH - 1)``` respectively\n- For CSMA/CA,  ```IFS``` is in milliseconds.\n\n### Additional Notes (Ubuntu)\n\n- Added single script to run all files. Use ```./arq.sh -h``` for help.\n- If you use zsh, change ```-- bash``` to ```-- zsh``` in lines 71, 74, 77. If you use any other terminal, make appropriate changes\n\n### Examples\n\nStop and Wait ARQ\n![Stop and Wait ARQ](./output_imgs/sw.png)\n\nGo Back N ARQ\n![Go Back N ARQ](./output_imgs/gbn.png)\n\nSelective Repeat ARQ\n![Selective Repeat ARQ](./output_imgs/sr.png)\n\nCSMA/CA Simulation\n![CSMA/CA Simulation](./output_imgs/csma-ca.png)\n\n*UEC1604 - Communication Networks, SSN College of Engineering*","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvdesmond%2Farq-protocols","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvdesmond%2Farq-protocols","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvdesmond%2Farq-protocols/lists"}