From 4a206af7510357e752f92bdfda913b1093b2bbbb Mon Sep 17 00:00:00 2001 From: M0VUB <76499782+ShaYmez@users.noreply.github.com> Date: Tue, 17 May 2022 01:33:19 +0100 Subject: [PATCH 01/39] Update Dockerfile Upgrade python version to 3.10 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9a0d22e..3f40b09 100755 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.9-alpine +FROM python:3.10-alpine COPY entrypoint /entrypoint From 148b346e846c019bc913cdbe32c71de47852ac99 Mon Sep 17 00:00:00 2001 From: M0VUB <76499782+ShaYmez@users.noreply.github.com> Date: Thu, 15 Dec 2022 17:05:23 +0000 Subject: [PATCH 02/39] Update Dockerfile Bump up python version to the latest. alpine 3.17 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3f40b09..4a4e174 100755 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.10-alpine +FROM python:alpine3.17 COPY entrypoint /entrypoint From ca222e1279023c1ce877c9e3f2a41ded2ee5152d Mon Sep 17 00:00:00 2001 From: M0VUB <76499782+ShaYmez@users.noreply.github.com> Date: Wed, 28 Dec 2022 02:00:38 +0000 Subject: [PATCH 03/39] Rename .gitignore to gitignoreHASH ignore gitnore while we build docker from actions --- .gitignore => gitignoreHASH | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .gitignore => gitignoreHASH (100%) diff --git a/.gitignore b/gitignoreHASH similarity index 100% rename from .gitignore rename to gitignoreHASH From 407499ad12ac0668be77f02da4d72d2ad1cbfe81 Mon Sep 17 00:00:00 2001 From: ShaYmez Date: Wed, 28 Dec 2022 02:12:08 +0000 Subject: [PATCH 04/39] Add workflow for docker-build --- .github/workflows/image.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/image.yml diff --git a/.github/workflows/image.yml b/.github/workflows/image.yml new file mode 100644 index 0000000..cb0282b --- /dev/null +++ b/.github/workflows/image.yml @@ -0,0 +1,24 @@ +name: Build-HBlink3 + +on: + push: + branches: master + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: checkout code + uses: actions/checkout@v2 + - name: install buildx + id: buildx + uses: crazy-max/ghaction-docker-buildx@v1 + with: + version: latest + - name: login to docker hub + run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin + - name: build the image + run: | + docker buildx build --push \ + --tag shaymez/hblink3:latest \ + --platform linux/i386,linux/amd64,linux/arm64,linux/arm/v7 . \ No newline at end of file From 5695a7207820f01b0a03cfeeceb2bdb772a1052a Mon Sep 17 00:00:00 2001 From: M0VUB <76499782+ShaYmez@users.noreply.github.com> Date: Wed, 28 Dec 2022 02:15:38 +0000 Subject: [PATCH 05/39] Update and rename gitignoreHASH to .gitignore .gitignore add workflows --- gitignoreHASH => .gitignore | 3 +++ 1 file changed, 3 insertions(+) rename gitignoreHASH => .gitignore (97%) diff --git a/gitignoreHASH b/.gitignore similarity index 97% rename from gitignoreHASH rename to .gitignore index 192fd9b..29af48d 100755 --- a/gitignoreHASH +++ b/.gitignore @@ -98,3 +98,6 @@ local_subscriber_ids.* peer_ids.* local_peer_ids.* talkgroup_ids.* + +# Workflows +.github/workflows/ From 217a5602a2c68f781a0daf7e52a03053fc74bf80 Mon Sep 17 00:00:00 2001 From: M0VUB <76499782+ShaYmez@users.noreply.github.com> Date: Wed, 28 Dec 2022 02:28:38 +0000 Subject: [PATCH 06/39] Update docker-compose.yml Open 20 ports by default --- docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index df58a61..61567fe 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,8 +7,8 @@ services: - '/var/log/hblink/hblink.log:/opt/hblink3/hblink.log' - '/etc/hblink3/rules.py:/opt/hblink3/rules.py' ports: - - '62030:62030/udp' - - '62031-62051:62031-62051/udp' + - '62030-62050:62030-62050/udp' + # TCP Port for HBmonitor - '4321:4321/tcp' image: 'shaymez/hblink3:latest' restart: "unless-stopped" From 36c9b1b69057295b8ba288f3ca5c1690a8eec58d Mon Sep 17 00:00:00 2001 From: M0VUB <76499782+ShaYmez@users.noreply.github.com> Date: Wed, 4 Jan 2023 01:00:44 +0000 Subject: [PATCH 07/39] Update docker-compose.yml Include /json/ enviroment outside container so that we can manage those iffy dumps from RadioID --- docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yml b/docker-compose.yml index 61567fe..cbe73dd 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,6 +6,7 @@ services: - '/etc/hblink3/hblink.cfg:/opt/hblink3/hblink.cfg' - '/var/log/hblink/hblink.log:/opt/hblink3/hblink.log' - '/etc/hblink3/rules.py:/opt/hblink3/rules.py' + - '/etc/hblink3/json/:/opt/hblink3/json/' ports: - '62030-62050:62030-62050/udp' # TCP Port for HBmonitor From 236858ca1107e5961473f7423a913e324e401f30 Mon Sep 17 00:00:00 2001 From: M0VUB <76499782+ShaYmez@users.noreply.github.com> Date: Thu, 25 May 2023 18:45:54 +0100 Subject: [PATCH 08/39] Update Dockerfile Bump up python version and force pip to use latest release --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4a4e174..0e8aeb8 100755 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,11 @@ -FROM python:alpine3.17 +FROM python:alpine3.18 COPY entrypoint /entrypoint RUN adduser -D -u 54000 radio && \ apk update && \ apk add git gcc musl-dev && \ + pip install --upgrade pip cd /opt && \ git clone https://github.com/ShaYmez/hblink3 && \ cd /opt/hblink3 && \ From de42de5245661e9c7c92863ab5f4ac72ef494a5c Mon Sep 17 00:00:00 2001 From: M0VUB <76499782+ShaYmez@users.noreply.github.com> Date: Thu, 25 May 2023 18:46:36 +0100 Subject: [PATCH 09/39] Update Dockerfile Fix bug in Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0e8aeb8..f21bca9 100755 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ COPY entrypoint /entrypoint RUN adduser -D -u 54000 radio && \ apk update && \ apk add git gcc musl-dev && \ - pip install --upgrade pip + pip install --upgrade pip && \ cd /opt && \ git clone https://github.com/ShaYmez/hblink3 && \ cd /opt/hblink3 && \ From 50d2a25de08557ce61ac870a5130f0eae6d41548 Mon Sep 17 00:00:00 2001 From: M0VUB <76499782+ShaYmez@users.noreply.github.com> Date: Sat, 5 Aug 2023 22:07:16 +0100 Subject: [PATCH 10/39] Update Dockerfile Purge cache --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index f21bca9..67713a2 100755 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,7 @@ RUN adduser -D -u 54000 radio && \ apk update && \ apk add git gcc musl-dev && \ pip install --upgrade pip && \ + pip cache purge && \ cd /opt && \ git clone https://github.com/ShaYmez/hblink3 && \ cd /opt/hblink3 && \ From 1ae31ab9502bc358a18f04a62476a593f16e3014 Mon Sep 17 00:00:00 2001 From: M0VUB <76499782+ShaYmez@users.noreply.github.com> Date: Sun, 6 Aug 2023 21:36:23 +0100 Subject: [PATCH 11/39] Create playback-SAMPLE.cfg Add sample playback config for the parrot system --- playback-SAMPLE.cfg | 47 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 playback-SAMPLE.cfg diff --git a/playback-SAMPLE.cfg b/playback-SAMPLE.cfg new file mode 100644 index 0000000..4014985 --- /dev/null +++ b/playback-SAMPLE.cfg @@ -0,0 +1,47 @@ +[GLOBAL] +PATH: ./ +PING_TIME: 10 +MAX_MISSED: 5 +USE_ACL: True +REG_ACL: PERMIT:ALL +SUB_ACL: DENY:1 +TGID_TS1_ACL: PERMIT:ALL +TGID_TS2_ACL: PERMIT:ALL + +[REPORTS] +REPORT: False +REPORT_INTERVAL: 10 +REPORT_PORT: 4323 +REPORT_CLIENTS: 127.0.0.1 + +[LOGGER] +LOG_FILE: /var/log/hblink/parrot.log +LOG_HANDLERS: file-timed +LOG_LEVEL: INFO +LOG_NAME: Parrot + +[ALIASES] +TRY_DOWNLOAD: False +PATH: ./ +PEER_FILE: peer_ids.json +SUBSCRIBER_FILE: subscriber_ids.json +TGID_FILE: talkgroup_ids.json +PEER_URL: https://www.radioid.net/static/rptrs.json +SUBSCRIBER_URL: https://www.radioid.net/static/users.json +STALE_DAYS: 14 + +[PARROT] +MODE: MASTER +ENABLED: True +REPEAT: True +MAX_PEERS: 10 +EXPORT_AMBE: False +IP: 127.0.0.1 +PORT: 54100 +PASSPHRASE: passw0rd +GROUP_HANGTIME: 5 +USE_ACL: True +REG_ACL: DENY:1 +SUB_ACL: DENY:1 +TGID_TS1_ACL: DENY:ALL +TGID_TS2_ACL: PERMIT:9999 From d09273e23052b73077b6a3e0f4f55f7769c5aa83 Mon Sep 17 00:00:00 2001 From: M0VUB <76499782+ShaYmez@users.noreply.github.com> Date: Sun, 6 Aug 2023 21:42:03 +0100 Subject: [PATCH 12/39] Update hblink-SAMPLE.cfg Add parrot into configuration stanza & update version --- hblink-SAMPLE.cfg | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/hblink-SAMPLE.cfg b/hblink-SAMPLE.cfg index c2e789d..1af853a 100755 --- a/hblink-SAMPLE.cfg +++ b/hblink-SAMPLE.cfg @@ -1,3 +1,4 @@ +# HBlink Configuration Version 20230806 # PROGRAM-WIDE PARAMETERS GO HERE # PATH - working path for files, leave it alone unless you NEED to change it # PING_TIME - the interval that peers will ping the master, and re-try registraion @@ -103,7 +104,7 @@ SUBSCRIBER_FILE: subscriber_ids.json TGID_FILE: talkgroup_ids.json PEER_URL: https://www.radioid.net/static/rptrs.json SUBSCRIBER_URL: https://www.radioid.net/static/users.json -STALE_DAYS: 7 +STALE_DAYS: 14 # OPENBRIDGE INSTANCES - DUPLICATE SECTION FOR MULTIPLE CONNECTIONS # OpenBridge is a protocol originall created by DMR+ for connection between an @@ -179,6 +180,38 @@ TGID_TS2_ACL: PERMIT:ALL # # ACLs: # See comments in the GLOBAL stanza +[Parrot] +MODE: PEER +ENABLED: True +LOOSE: True +EXPORT_AMBE: False +IP: 127.0.0.1 +PORT: 54098 +MASTER_IP: 127.0.0.1 +MASTER_PORT: 54100 +PASSPHRASE: passw0rd +CALLSIGN: ECHO +RADIO_ID: 9999 +RX_FREQ: 434000000 +TX_FREQ: 434000000 +TX_POWER: 10 +COLORCODE: 1 +SLOTS: 2 +LATITUDE: 33.0000 +LONGITUDE: -84.0000 +HEIGHT: 75 +LOCATION: +DESCRIPTION: +URL: +SOFTWARE_ID: 20230806 +PACKAGE_ID: MMDVM_HBlink +GROUP_HANGTIME: 5 +OPTIONS: +USE_ACL: False +SUB_ACL: DENY:1 +TGID_TS1_ACL: PERMIT:ALL +TGID_TS2_ACL: PERMIT:ALL + [REPEATER-1] MODE: PEER ENABLED: True @@ -202,7 +235,7 @@ HEIGHT: 75 LOCATION: Anywhere, USA DESCRIPTION: This is a cool repeater URL: www.w1abc.org -SOFTWARE_ID: 20170620 +SOFTWARE_ID: 20230806 PACKAGE_ID: MMDVM_HBlink GROUP_HANGTIME: 5 OPTIONS: @@ -234,7 +267,7 @@ HEIGHT: 75 LOCATION: Anywhere, USA DESCRIPTION: This is a cool repeater URL: www.w1abc.org -SOFTWARE_ID: 20170620 +SOFTWARE_ID: 20230806 PACKAGE_ID: MMDVM_HBlink GROUP_HANGTIME: 5 XLXMODULE: 4004 From 0f492ac0767b51d9d97431e264079c432f8ff5bd Mon Sep 17 00:00:00 2001 From: M0VUB <76499782+ShaYmez@users.noreply.github.com> Date: Sun, 6 Aug 2023 21:43:21 +0100 Subject: [PATCH 13/39] Update .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 29af48d..37bd4e3 100755 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ __pycache__/ *.so # Distribution / packaging +.github .Python env/ build/ From 9ba9de80a10d86d56cda52bce9ca3c9bce8ce7bd Mon Sep 17 00:00:00 2001 From: M0VUB <76499782+ShaYmez@users.noreply.github.com> Date: Sun, 6 Aug 2023 22:00:10 +0100 Subject: [PATCH 14/39] Update rules_SAMPLE.py Add playback parrot example stanzas into rules --- rules_SAMPLE.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/rules_SAMPLE.py b/rules_SAMPLE.py index b46a46a..74994e6 100755 --- a/rules_SAMPLE.py +++ b/rules_SAMPLE.py @@ -11,6 +11,7 @@ bridge. This is any arbitrary ASCII text string you want to use. Under each conference bridge definition are the following items -- one line for each HBSystem as defined in the main HBlink configuration file. +"Parrot" has been added on TG 9999 and an example subset demonstrating playback parrot feature (if enabled) * SYSTEM - The name of the sytem as listed in the main hblink configuration file (e.g. hblink.cfg) This MUST be the exact same name as in the main config file!!! @@ -33,6 +34,12 @@ ''' BRIDGES = { + '9999 Parrot': [ + {'SYSTEM': 'Hotspot-1', 'TS': 2, 'TGID': 9999, 'ACTIVE': True, 'TIMEOUT': 0, 'TO_TYPE': 'NONE', 'ON': [9999], 'OFF': [], 'RESET': []}, + {'SYSTEM': 'Hotspot-2', 'TS': 2, 'TGID': 9999, 'ACTIVE': True, 'TIMEOUT': 0, 'TO_TYPE': 'NONE', 'ON': [9999], 'OFF': [], 'RESET': []}, + {'SYSTEM': 'Parrot', 'TS': 2, 'TGID': 9999, 'ACTIVE': True, 'TIMEOUT': 0, 'TO_TYPE': 'NONE', 'ON': [], 'OFF': [], 'RESET': []}, + ], + 'WORLDWIDE': [ {'SYSTEM': 'MASTER-1', 'TS': 1, 'TGID': 1, 'ACTIVE': True, 'TIMEOUT': 2, 'TO_TYPE': 'ON', 'ON': [2,], 'OFF': [9,10], 'RESET': []}, {'SYSTEM': 'CLIENT-1', 'TS': 1, 'TGID': 3100, 'ACTIVE': True, 'TIMEOUT': 2, 'TO_TYPE': 'ON', 'ON': [2,], 'OFF': [9,10], 'RESET': []}, From 34e1d3827b3c5503c2c1221b26b9527ef2288dbe Mon Sep 17 00:00:00 2001 From: M0VUB <76499782+ShaYmez@users.noreply.github.com> Date: Sun, 6 Aug 2023 22:26:49 +0100 Subject: [PATCH 15/39] Update docker-compose.yml Add variable for enabling parrot (if needed) --- docker-compose.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index cbe73dd..b91f60f 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,3 +13,6 @@ services: - '4321:4321/tcp' image: 'shaymez/hblink3:latest' restart: "unless-stopped" + environment: + - 'PARROT_ENABLE=1' + From 4cad03f2f5d044dcd95eec94a02cde2f02775ac2 Mon Sep 17 00:00:00 2001 From: M0VUB <76499782+ShaYmez@users.noreply.github.com> Date: Sun, 6 Aug 2023 22:31:34 +0100 Subject: [PATCH 16/39] Update docker-compose.yml Disable by default =0 enable =1 --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index b91f60f..4c42379 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,5 +14,5 @@ services: image: 'shaymez/hblink3:latest' restart: "unless-stopped" environment: - - 'PARROT_ENABLE=1' + - 'PARROT_ENABLE=0' From ee789c8846bab8b2a9b11e9a3f2a1e6179cf7e4d Mon Sep 17 00:00:00 2001 From: M0VUB <76499782+ShaYmez@users.noreply.github.com> Date: Sun, 6 Aug 2023 22:40:28 +0100 Subject: [PATCH 17/39] Update entrypoint Change entrypoint to include playback enviroment variable --- entrypoint | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/entrypoint b/entrypoint index fceef72..fce300e 100755 --- a/entrypoint +++ b/entrypoint @@ -1,4 +1,11 @@ #!/bin/sh - cd /opt/hblink3 -python /opt/hblink3/bridge.py -c hblink.cfg -r rules.py + +if [ "$PARROT_ENABLE" == 1 ] +then + echo 'Staring HBlink with Parrot.....' + python /opt/hblink3/bridge.py -c hblink.cfg -r rules.py & + python /opt/hblink3/playback.py -c playback.cfg +else + python /opt/hblink3/bridge.py -c hblink.cfg -r rules.py +fi From 37d5a4adc914ceeb0b3ade5cdedbca9529ffbb57 Mon Sep 17 00:00:00 2001 From: M0VUB <76499782+ShaYmez@users.noreply.github.com> Date: Sun, 6 Aug 2023 22:42:27 +0100 Subject: [PATCH 18/39] Update entrypoint Typo --- entrypoint | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/entrypoint b/entrypoint index fce300e..c6b1bf3 100755 --- a/entrypoint +++ b/entrypoint @@ -3,9 +3,10 @@ cd /opt/hblink3 if [ "$PARROT_ENABLE" == 1 ] then - echo 'Staring HBlink with Parrot.....' + echo 'Starting HBlink with Parrot.....' python /opt/hblink3/bridge.py -c hblink.cfg -r rules.py & python /opt/hblink3/playback.py -c playback.cfg else + echo 'Starting HBlink.....' python /opt/hblink3/bridge.py -c hblink.cfg -r rules.py fi From 3c4f3b453ece3a3021599be28427a492b116c754 Mon Sep 17 00:00:00 2001 From: M0VUB <76499782+ShaYmez@users.noreply.github.com> Date: Sun, 6 Aug 2023 23:00:58 +0100 Subject: [PATCH 19/39] Rename playback-SAMPLE.cfg to playback.cfg Bring playback cfg into play ;) --- playback-SAMPLE.cfg => playback.cfg | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename playback-SAMPLE.cfg => playback.cfg (100%) diff --git a/playback-SAMPLE.cfg b/playback.cfg similarity index 100% rename from playback-SAMPLE.cfg rename to playback.cfg From c7ebc030f34919d027b5c4acfbf0be9166ffa5df Mon Sep 17 00:00:00 2001 From: M0VUB <76499782+ShaYmez@users.noreply.github.com> Date: Sun, 6 Aug 2023 23:50:29 +0100 Subject: [PATCH 20/39] Update hblink-SAMPLE.cfg Update config and fix logging paths --- hblink-SAMPLE.cfg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hblink-SAMPLE.cfg b/hblink-SAMPLE.cfg index 1af853a..d869f62 100755 --- a/hblink-SAMPLE.cfg +++ b/hblink-SAMPLE.cfg @@ -65,7 +65,7 @@ TGID_TS2_ACL: PERMIT:ALL REPORT: True REPORT_INTERVAL: 60 REPORT_PORT: 4321 -REPORT_CLIENTS: 127.0.0.1 +REPORT_CLIENTS: * # SYSTEM LOGGER CONFIGURAITON @@ -85,9 +85,9 @@ REPORT_CLIENTS: 127.0.0.1 # used. # [LOGGER] -LOG_FILE: /tmp/hblink.log +LOG_FILE: hblink.log LOG_HANDLERS: console-timed -LOG_LEVEL: DEBUG +LOG_LEVEL: INFO LOG_NAME: HBlink # DOWNLOAD AND IMPORT SUBSCRIBER, PEER and TGID ALIASES From fd51df90b14709baea44556e25400524964f4607 Mon Sep 17 00:00:00 2001 From: M0VUB <76499782+ShaYmez@users.noreply.github.com> Date: Sun, 6 Aug 2023 23:52:23 +0100 Subject: [PATCH 21/39] Update playback.cfg Fix logging paths and add to console --- playback.cfg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/playback.cfg b/playback.cfg index 4014985..2c8df84 100644 --- a/playback.cfg +++ b/playback.cfg @@ -12,11 +12,11 @@ TGID_TS2_ACL: PERMIT:ALL REPORT: False REPORT_INTERVAL: 10 REPORT_PORT: 4323 -REPORT_CLIENTS: 127.0.0.1 +REPORT_CLIENTS: * [LOGGER] -LOG_FILE: /var/log/hblink/parrot.log -LOG_HANDLERS: file-timed +LOG_FILE: parrot.log +LOG_HANDLERS: file-timed,console-timed LOG_LEVEL: INFO LOG_NAME: Parrot From 2e0e044f2c69071721b86ce8e6eab0db2eba0014 Mon Sep 17 00:00:00 2001 From: M0VUB <76499782+ShaYmez@users.noreply.github.com> Date: Mon, 7 Aug 2023 00:23:48 +0100 Subject: [PATCH 22/39] Update hblink-SAMPLE.cfg Set parrot to False by default --- hblink-SAMPLE.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hblink-SAMPLE.cfg b/hblink-SAMPLE.cfg index d869f62..2e9687d 100755 --- a/hblink-SAMPLE.cfg +++ b/hblink-SAMPLE.cfg @@ -182,7 +182,7 @@ TGID_TS2_ACL: PERMIT:ALL # See comments in the GLOBAL stanza [Parrot] MODE: PEER -ENABLED: True +ENABLED: False LOOSE: True EXPORT_AMBE: False IP: 127.0.0.1 From 7b9fd4bab16f355317200bceb35fd5653c9518af Mon Sep 17 00:00:00 2001 From: M0VUB <76499782+ShaYmez@users.noreply.github.com> Date: Mon, 7 Aug 2023 00:25:24 +0100 Subject: [PATCH 23/39] Update playback.cfg Set parrot logging to console only --- playback.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playback.cfg b/playback.cfg index 2c8df84..ac07190 100644 --- a/playback.cfg +++ b/playback.cfg @@ -16,7 +16,7 @@ REPORT_CLIENTS: * [LOGGER] LOG_FILE: parrot.log -LOG_HANDLERS: file-timed,console-timed +LOG_HANDLERS: console-timed LOG_LEVEL: INFO LOG_NAME: Parrot From ab94a12e70c0b3349db714c2da6a2cbf5174a36a Mon Sep 17 00:00:00 2001 From: M0VUB <76499782+ShaYmez@users.noreply.github.com> Date: Mon, 7 Aug 2023 00:57:43 +0100 Subject: [PATCH 24/39] Update docker-compose.yml Map ports for masters outside the container! --- docker-compose.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 4c42379..da628c3 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,11 +8,13 @@ services: - '/etc/hblink3/rules.py:/opt/hblink3/rules.py' - '/etc/hblink3/json/:/opt/hblink3/json/' ports: + # Master Ports (99 Masters) + - '54000-54099:5400-54099/udp' + # MMDVM & OBP Ports - '62030-62050:62030-62050/udp' # TCP Port for HBmonitor - '4321:4321/tcp' image: 'shaymez/hblink3:latest' restart: "unless-stopped" environment: - - 'PARROT_ENABLE=0' - + - 'PARROT_ENABLE=1' From 71c285d50d5e6e1ff07bded8b618afec9ca2d6b8 Mon Sep 17 00:00:00 2001 From: M0VUB <76499782+ShaYmez@users.noreply.github.com> Date: Mon, 7 Aug 2023 01:01:23 +0100 Subject: [PATCH 25/39] Update docker-compose.yml Fix port ranges ahh! --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index da628c3..7fa14df 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,7 +9,7 @@ services: - '/etc/hblink3/json/:/opt/hblink3/json/' ports: # Master Ports (99 Masters) - - '54000-54099:5400-54099/udp' + - '54000-54099:54000-54099/udp' # MMDVM & OBP Ports - '62030-62050:62030-62050/udp' # TCP Port for HBmonitor From 9f489e07e59780a01b7e55eb8b7c9b01b201ff3c Mon Sep 17 00:00:00 2001 From: M0VUB <76499782+ShaYmez@users.noreply.github.com> Date: Fri, 11 Aug 2023 16:39:21 +0100 Subject: [PATCH 26/39] Update playback.cfg Add 9990 to the mix --- playback.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playback.cfg b/playback.cfg index ac07190..b9c5da9 100644 --- a/playback.cfg +++ b/playback.cfg @@ -44,4 +44,4 @@ USE_ACL: True REG_ACL: DENY:1 SUB_ACL: DENY:1 TGID_TS1_ACL: DENY:ALL -TGID_TS2_ACL: PERMIT:9999 +TGID_TS2_ACL: PERMIT:9999,9990 From 4cf181cb8deffde0fe5df8683892d033bee41c7f Mon Sep 17 00:00:00 2001 From: M0VUB <76499782+ShaYmez@users.noreply.github.com> Date: Fri, 14 Jun 2024 00:52:34 +0100 Subject: [PATCH 27/39] Create version.txt Add versioning --- version.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 version.txt diff --git a/version.txt b/version.txt new file mode 100644 index 0000000..15d45d4 --- /dev/null +++ b/version.txt @@ -0,0 +1 @@ +1.6.9 From b99dc88497de5ede1c24da765369b1540dfe0f3c Mon Sep 17 00:00:00 2001 From: M0VUB <76499782+ShaYmez@users.noreply.github.com> Date: Wed, 13 Nov 2024 23:38:05 +0000 Subject: [PATCH 28/39] Update version.txt Versioning - rebuild image - update --- version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.txt b/version.txt index 15d45d4..1df3b82 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.6.9 +1.6.10 From 1481b09b791014b55342dc240860e429b265fb8f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 13 Dec 2025 00:51:18 +0000 Subject: [PATCH 29/39] Initial plan From db045ad5829927b49f43620d2933a89c5a963c9e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 13 Dec 2025 00:58:15 +0000 Subject: [PATCH 30/39] Fix typos, remove commented code, and simplify boolean comparisons Co-authored-by: ShaYmez <76499782+ShaYmez@users.noreply.github.com> --- README.md | 2 +- bridge.py | 43 +++++++++++++++++++++---------------------- bridge_all.py | 2 +- config.py | 6 +++--- hblink.py | 8 ++++---- play_ambe.py | 3 +-- playback.py | 4 ++-- 7 files changed, 33 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index bf3e36a..8956728 100755 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Please join the DVSwitch group at groups.io for online forum support, discussion DVSwitch@groups.io -A voluntary registrty for HBlink systems with public access has been created at http://hblink-register.com.es Please consider listing your system if you allow open access. +A voluntary registry for HBlink systems with public access has been created at http://hblink-register.com.es Please consider listing your system if you allow open access. --- diff --git a/bridge.py b/bridge.py index 706a842..53d5176 100755 --- a/bridge.py +++ b/bridge.py @@ -25,7 +25,7 @@ bridge will both receive traffic from, and send traffic to any other system joined to the same conference bridge. It does not provide end-to-end connectivity as each end system must individually be joined to a conference bridge (a name -you create in the configuraiton file) to pass traffic. +you create in the configuration file) to pass traffic. This program currently only works with group voice calls. ''' @@ -51,7 +51,6 @@ # Stuff for socket reporting import pickle -# REMOVE LATER from datetime import datetime # The module needs logging, but handlers, etc. are controlled by the parent import logging logger = logging.getLogger(__name__) @@ -65,7 +64,7 @@ __maintainer__ = 'Cort Buffington, N0MJS' __email__ = 'n0mjs@me.com' -# Module gobal varaibles +# Module global variables # Dictionary for dynamically mapping unit (subscriber) to a system. # This is for pruning unit-to-uint calls to not broadcast once the @@ -114,7 +113,7 @@ def make_bridges(_rules): for i, e in enumerate(_system['OFF']): _system['OFF'][i] = bytes_3(_system['OFF'][i]) _system['TIMEOUT'] = _system['TIMEOUT']*60 - if _system['ACTIVE'] == True: + if _system['ACTIVE']: _system['TIMER'] = time() + _system['TIMEOUT'] else: _system['TIMER'] = time() @@ -130,24 +129,24 @@ def rule_timer_loop(): for _bridge in BRIDGES: for _system in BRIDGES[_bridge]: if _system['TO_TYPE'] == 'ON': - if _system['ACTIVE'] == True: + if _system['ACTIVE']: if _system['TIMER'] < _now: _system['ACTIVE'] = False logger.info('(ROUTER) Conference Bridge TIMEOUT: DEACTIVATE System: %s, Bridge: %s, TS: %s, TGID: %s', _system['SYSTEM'], _bridge, _system['TS'], int_id(_system['TGID'])) else: timeout_in = _system['TIMER'] - _now logger.info('(ROUTER) Conference Bridge ACTIVE (ON timer running): System: %s Bridge: %s, TS: %s, TGID: %s, Timeout in: %.2fs,', _system['SYSTEM'], _bridge, _system['TS'], int_id(_system['TGID']), timeout_in) - elif _system['ACTIVE'] == False: + elif not _system['ACTIVE']: logger.debug('(ROUTER) Conference Bridge INACTIVE (no change): System: %s Bridge: %s, TS: %s, TGID: %s', _system['SYSTEM'], _bridge, _system['TS'], int_id(_system['TGID'])) elif _system['TO_TYPE'] == 'OFF': - if _system['ACTIVE'] == False: + if not _system['ACTIVE']: if _system['TIMER'] < _now: _system['ACTIVE'] = True logger.info('(ROUTER) Conference Bridge TIMEOUT: ACTIVATE System: %s, Bridge: %s, TS: %s, TGID: %s', _system['SYSTEM'], _bridge, _system['TS'], int_id(_system['TGID'])) else: timeout_in = _system['TIMER'] - _now logger.info('(ROUTER) Conference Bridge INACTIVE (OFF timer running): System: %s Bridge: %s, TS: %s, TGID: %s, Timeout in: %.2fs,', _system['SYSTEM'], _bridge, _system['TS'], int_id(_system['TGID']), timeout_in) - elif _system['ACTIVE'] == True: + elif _system['ACTIVE']: logger.debug('(ROUTER) Conference Bridge ACTIVE (no change): System: %s Bridge: %s, TS: %s, TGID: %s', _system['SYSTEM'], _bridge, _system['TS'], int_id(_system['TGID'])) else: logger.debug('(ROUTER) Conference Bridge NO ACTION: System: %s, Bridge: %s, TS: %s, TGID: %s', _system['SYSTEM'], _bridge, _system['TS'], int_id(_system['TGID'])) @@ -335,22 +334,22 @@ def group_received(self, _peer_id, _rf_src, _dst_id, _seq, _slot, _frame_type, _ # The "continue" at the end of each means the next iteration of the for loop that tests for matching rules # if ((_target['TGID'] != _target_status[_target['TS']]['RX_TGID']) and ((pkt_time - _target_status[_target['TS']]['RX_TIME']) < _target_system['GROUP_HANGTIME'])): - if self.STATUS[_stream_id]['CONTENTION'] == False: + if not self.STATUS[_stream_id]['CONTENTION']: self.STATUS[_stream_id]['CONTENTION'] = True logger.info('(%s) Call not routed to TGID %s, target active or in group hangtime: HBSystem: %s, TS: %s, TGID: %s', self._system, int_id(_target['TGID']), _target['SYSTEM'], _target['TS'], int_id(_target_status[_target['TS']]['RX_TGID'])) continue if ((_target['TGID'] != _target_status[_target['TS']]['TX_TGID']) and ((pkt_time - _target_status[_target['TS']]['TX_TIME']) < _target_system['GROUP_HANGTIME'])): - if self.STATUS[_stream_id]['CONTENTION'] == False: + if not self.STATUS[_stream_id]['CONTENTION']: self.STATUS[_stream_id]['CONTENTION'] = True logger.info('(%s) Call not routed to TGID%s, target in group hangtime: HBSystem: %s, TS: %s, TGID: %s', self._system, int_id(_target['TGID']), _target['SYSTEM'], _target['TS'], int_id(_target_status[_target['TS']]['TX_TGID'])) continue if (_target['TGID'] == _target_status[_target['TS']]['RX_TGID']) and ((pkt_time - _target_status[_target['TS']]['RX_TIME']) < STREAM_TO): - if self.STATUS[_stream_id]['CONTENTION'] == False: + if not self.STATUS[_stream_id]['CONTENTION']: self.STATUS[_stream_id]['CONTENTION'] = True logger.info('(%s) Call not routed to TGID%s, matching call already active on target: HBSystem: %s, TS: %s, TGID: %s', self._system, int_id(_target['TGID']), _target['SYSTEM'], _target['TS'], int_id(_target_status[_target['TS']]['RX_TGID'])) continue if (_target['TGID'] == _target_status[_target['TS']]['TX_TGID']) and (_rf_src != _target_status[_target['TS']]['TX_RFS']) and ((pkt_time - _target_status[_target['TS']]['TX_TIME']) < STREAM_TO): - if self.STATUS[_stream_id]['CONTENTION'] == False: + if not self.STATUS[_stream_id]['CONTENTION']: self.STATUS[_stream_id]['CONTENTION'] = True logger.info('(%s) Call not routed for subscriber %s, call route in progress on target: HBSystem: %s, TS: %s, TGID: %s, SUB: %s', self._system, int_id(_rf_src), _target['SYSTEM'], _target['TS'], int_id(_target_status[_target['TS']]['TX_TGID']), int_id(_target_status[_target['TS']]['TX_RFS'])) continue @@ -512,23 +511,23 @@ def unit_received(self, _peer_id, _rf_src, _dst_id, _seq, _slot, _frame_type, _d # ''' if ((_dst_id != _target_status[_slot]['RX_TGID']) and ((pkt_time - _target_status[_slot]['RX_TIME']) < _target_system['GROUP_HANGTIME'])): - if self.STATUS[_stream_id]['CONTENTION'] == False: + if not self.STATUS[_stream_id]['CONTENTION']: self.STATUS[_stream_id]['CONTENTION'] = True logger.info('(%s) Call not routed to TGID %s, target active or in group hangtime: HBSystem: %s, TS: %s, TGID: %s', self._system, int_id(_dst_id), _target, _slot, int_id(_target_status[_slot]['RX_TGID'])) continue if ((_dst_id != _target_status[_slot]['TX_TGID']) and ((pkt_time - _target_status[_slot]['TX_TIME']) < _target_system['GROUP_HANGTIME'])): - if self.STATUS[_stream_id]['CONTENTION'] == False: + if not self.STATUS[_stream_id]['CONTENTION']: self.STATUS[_stream_id]['CONTENTION'] = True logger.info('(%s) Call not routed to TGID%s, target in group hangtime: HBSystem: %s, TS: %s, TGID: %s', self._system, int_id(_dst_id), _target, _slot, int_id(_target_status[_slot]['TX_TGID'])) continue ''' if (_dst_id == _target_status[_slot]['RX_TGID']) and ((pkt_time - _target_status[_slot]['RX_TIME']) < STREAM_TO): - if self.STATUS[_stream_id]['CONTENTION'] == False: + if not self.STATUS[_stream_id]['CONTENTION']: self.STATUS[_stream_id]['CONTENTION'] = True logger.info('(%s) Call not routed to TGID%s, matching call already active on target: HBSystem: %s, TS: %s, TGID: %s', self._system, int_id(_dst_id), _target, _slot, int_id(_target_status[_slot]['RX_TGID'])) continue if (_dst_id == _target_status[_slot]['TX_TGID']) and (_rf_src != _target_status[_slot]['TX_RFS']) and ((pkt_time - _target_status[_slot]['TX_TIME']) < STREAM_TO): - if self.STATUS[_stream_id]['CONTENTION'] == False: + if not self.STATUS[_stream_id]['CONTENTION']: self.STATUS[_stream_id]['CONTENTION'] = True logger.info('(%s) Call not routed for subscriber %s, call route in progress on target: HBSystem: %s, TS: %s, TGID: %s, SUB: %s', self._system, int_id(_rf_src), _target, _slot, int_id(_target_status[_slot]['TX_TGID']), int_id(_target_status[_slot]['TX_RFS'])) continue @@ -847,7 +846,7 @@ def group_received(self, _peer_id, _rf_src, _dst_id, _seq, _slot, _frame_type, _ if _system['SYSTEM'] == self._system: # TGID matches a rule source, reset its timer - if _slot == _system['TS'] and _dst_id == _system['TGID'] and ((_system['TO_TYPE'] == 'ON' and (_system['ACTIVE'] == True)) or (_system['TO_TYPE'] == 'OFF' and _system['ACTIVE'] == False)): + if _slot == _system['TS'] and _dst_id == _system['TGID'] and ((_system['TO_TYPE'] == 'ON' and _system['ACTIVE']) or (_system['TO_TYPE'] == 'OFF' and not _system['ACTIVE'])): _system['TIMER'] = pkt_time + _system['TIMEOUT'] logger.info('(%s) Transmission match for Bridge: %s. Reset timeout to %s', self._system, _bridge, _system['TIMER']) @@ -855,7 +854,7 @@ def group_received(self, _peer_id, _rf_src, _dst_id, _seq, _slot, _frame_type, _ if (_dst_id in _system['ON'] or _dst_id in _system['RESET']) and _slot == _system['TS']: # Set the matching rule as ACTIVE if _dst_id in _system['ON']: - if _system['ACTIVE'] == False: + if not _system['ACTIVE']: _system['ACTIVE'] = True _system['TIMER'] = pkt_time + _system['TIMEOUT'] logger.info('(%s) Bridge: %s, connection changed to state: %s', self._system, _bridge, _system['ACTIVE']) @@ -864,7 +863,7 @@ def group_received(self, _peer_id, _rf_src, _dst_id, _seq, _slot, _frame_type, _ _system['TIMER'] = pkt_time logger.info('(%s) Bridge: %s set to "OFF" with an on timer rule: timeout timer cancelled', self._system, _bridge) # Reset the timer for the rule - if _system['ACTIVE'] == True and _system['TO_TYPE'] == 'ON': + if _system['ACTIVE'] and _system['TO_TYPE'] == 'ON': _system['TIMER'] = pkt_time + _system['TIMEOUT'] logger.info('(%s) Bridge: %s, timeout timer reset to: %s', self._system, _bridge, _system['TIMER'] - pkt_time) @@ -872,7 +871,7 @@ def group_received(self, _peer_id, _rf_src, _dst_id, _seq, _slot, _frame_type, _ if (_dst_id in _system['OFF'] or _dst_id in _system['RESET']) and _slot == _system['TS']: # Set the matching rule as ACTIVE if _dst_id in _system['OFF']: - if _system['ACTIVE'] == True: + if _system['ACTIVE']: _system['ACTIVE'] = False logger.info('(%s) Bridge: %s, connection changed to state: %s', self._system, _bridge, _system['ACTIVE']) # Cancel the timer if we've enabled an "ON" type timeout @@ -880,11 +879,11 @@ def group_received(self, _peer_id, _rf_src, _dst_id, _seq, _slot, _frame_type, _ _system['TIMER'] = pkt_time logger.info('(%s) Bridge: %s set to ON with and "OFF" timer rule: timeout timer cancelled', self._system, _bridge) # Reset the timer for the rule - if _system['ACTIVE'] == False and _system['TO_TYPE'] == 'OFF': + if not _system['ACTIVE'] and _system['TO_TYPE'] == 'OFF': _system['TIMER'] = pkt_time + _system['TIMEOUT'] logger.info('(%s) Bridge: %s, timeout timer reset to: %s', self._system, _bridge, _system['TIMER'] - pkt_time) # Cancel the timer if we've enabled an "ON" type timeout - if _system['ACTIVE'] == True and _system['TO_TYPE'] == 'ON' and _dst_group in _system['OFF']: + if _system['ACTIVE'] and _system['TO_TYPE'] == 'ON' and _dst_group in _system['OFF']: _system['TIMER'] = pkt_time logger.info('(%s) Bridge: %s set to ON with and "OFF" timer rule: timeout timer cancelled', self._system, _bridge) diff --git a/bridge_all.py b/bridge_all.py index 0b36036..3d81afe 100755 --- a/bridge_all.py +++ b/bridge_all.py @@ -67,7 +67,7 @@ __email__ = 'n0mjs@me.com' __status__ = 'pre-alpha' -# Module gobal varaibles +# Module global variables class bridgeallSYSTEM(HBSYSTEM): diff --git a/config.py b/config.py index 7600642..3ce8979 100755 --- a/config.py +++ b/config.py @@ -20,9 +20,9 @@ ''' This module generates the configuration data structure for hblink.py and -assoicated programs that use it. It has been seaparated into a different -module so as to keep hblink.py easeier to navigate. This file only needs -updated if the items in the main configuraiton file (usually hblink.cfg) +associated programs that use it. It has been separated into a different +module so as to keep hblink.py easier to navigate. This file only needs +updated if the items in the main configuration file (usually hblink.cfg) change. ''' diff --git a/hblink.py b/hblink.py index f586ef3..7e68149 100755 --- a/hblink.py +++ b/hblink.py @@ -27,7 +27,7 @@ sufficient logging to be used standalone as a troubleshooting application. ''' -# Specifig functions from modules we need +# Specific functions from modules we need from binascii import b2a_hex as ahex from binascii import a2b_hex as bhex from random import randint @@ -388,7 +388,7 @@ def master_datagramReceived(self, _data, _sockaddr): return # The basic purpose of a master is to repeat to the peers - if self._config['REPEAT'] == True: + if self._config['REPEAT']: pkt = [_data[:11], '', _data[15:]] for _peer in self._peers: if _peer != _peer_id: @@ -466,7 +466,7 @@ def master_datagramReceived(self, _data, _sockaddr): self.transport.write(b''.join([MSTNAK, _peer_id]), _sockaddr) logger.warning('(%s) Login challenge from Radio ID that has not logged in: %s', self._system, int_id(_peer_id)) - elif _command == RPTC: # Repeater is sending it's configuraiton OR disconnecting + elif _command == RPTC: # Repeater is sending it's configuration OR disconnecting if _data[:5] == RPTCL: # Disconnect command _peer_id = _data[5:9] if _peer_id in self._peers \ @@ -752,7 +752,7 @@ def send_config(self): # ID ALIAS CREATION # Download def mk_aliases(_config): - if _config['ALIASES']['TRY_DOWNLOAD'] == True: + if _config['ALIASES']['TRY_DOWNLOAD']: # Try updating peer aliases file result = try_download(_config['ALIASES']['PATH'], _config['ALIASES']['PEER_FILE'], _config['ALIASES']['PEER_URL'], _config['ALIASES']['STALE_TIME']) logger.info('(GLOBAL) %s', result) diff --git a/play_ambe.py b/play_ambe.py index b792aee..c319b44 100755 --- a/play_ambe.py +++ b/play_ambe.py @@ -42,7 +42,6 @@ # Stuff for socket reporting import pickle -# REMOVE LATER from datetime import datetime # The module needs logging, but handlers, etc. are controlled by the parent import logging logger = logging.getLogger(__name__) @@ -56,7 +55,7 @@ __maintainer__ = 'Cort Buffington, N0MJS' __email__ = 'n0mjs@me.com' -# Module gobal varaibles +# Module global variables class OBP(OPENBRIDGE): diff --git a/playback.py b/playback.py index c40f020..8544ae5 100755 --- a/playback.py +++ b/playback.py @@ -51,7 +51,7 @@ __email__ = 'n0mjs@me.com' __status__ = 'pre-alpha' -# Module gobal varaibles +# Module global variables class playback(HBSYSTEM): @@ -200,7 +200,7 @@ def sig_handler(_signal, _frame): # ID ALIAS CREATION # Download - if CONFIG['ALIASES']['TRY_DOWNLOAD'] == True: + if CONFIG['ALIASES']['TRY_DOWNLOAD']: # Try updating peer aliases file result = try_download(CONFIG['ALIASES']['PATH'], CONFIG['ALIASES']['PEER_FILE'], CONFIG['ALIASES']['PEER_URL'], CONFIG['ALIASES']['STALE_TIME']) logger.info(result) From 866d222646a7c0e212244a5a8d768f378d66db9e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 13 Dec 2025 01:57:49 +0000 Subject: [PATCH 31/39] Initial plan From c67c49f57d43f0b027b7811643b8386d6fbe20e6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 13 Dec 2025 02:03:52 +0000 Subject: [PATCH 32/39] Fix Debian 13 compatibility: Update Alpine base, fix shell script, update GitHub Actions Co-authored-by: ShaYmez <76499782+ShaYmez@users.noreply.github.com> --- .github/workflows/image.yml | 11 ++++++----- Dockerfile | 2 +- docker-compose.yml | 2 +- entrypoint | 4 ++-- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/image.yml b/.github/workflows/image.yml index cb0282b..3307f55 100644 --- a/.github/workflows/image.yml +++ b/.github/workflows/image.yml @@ -9,14 +9,15 @@ jobs: runs-on: ubuntu-latest steps: - name: checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: install buildx id: buildx - uses: crazy-max/ghaction-docker-buildx@v1 - with: - version: latest + uses: docker/setup-buildx-action@v3 - name: login to docker hub - run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} - name: build the image run: | docker buildx build --push \ diff --git a/Dockerfile b/Dockerfile index 67713a2..0a6008d 100755 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:alpine3.18 +FROM python:alpine3.20 COPY entrypoint /entrypoint diff --git a/docker-compose.yml b/docker-compose.yml index 7fa14df..7ca788f 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,4 @@ -version: '2.4' +version: '3.8' services: hblink3: container_name: hblink diff --git a/entrypoint b/entrypoint index c6b1bf3..75b49bb 100755 --- a/entrypoint +++ b/entrypoint @@ -1,7 +1,7 @@ #!/bin/sh -cd /opt/hblink3 +cd /opt/hblink3 || exit -if [ "$PARROT_ENABLE" == 1 ] +if [ "$PARROT_ENABLE" = 1 ] then echo 'Starting HBlink with Parrot.....' python /opt/hblink3/bridge.py -c hblink.cfg -r rules.py & From 8e7c23def11585797f3722e1e8d0b068352639ce Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 13 Dec 2025 02:05:57 +0000 Subject: [PATCH 33/39] Update dependency versions for better Debian 13 compatibility and remove obsolete docker-compose version Co-authored-by: ShaYmez <76499782+ShaYmez@users.noreply.github.com> --- docker-compose.yml | 1 - requirements.txt | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 7ca788f..44adf15 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,3 @@ -version: '3.8' services: hblink3: container_name: hblink diff --git a/requirements.txt b/requirements.txt index 910b5d3..180f09b 100755 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ -bitstring>=3.1.9 -bitarray>=2.3.5 -Twisted>=21.7.0 +bitstring>=4.0.0 +bitarray>=2.8.0 +Twisted>=24.0.0 dmr_utils3>=0.1.29 -configparser>=5.2.0 +configparser>=7.0.0 From bada0624e2f46cf77ca30cbb370ee2fd8e699c5d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 13 Dec 2025 02:09:40 +0000 Subject: [PATCH 34/39] Add CHANGELOG.md to document Debian 13 compatibility updates Co-authored-by: ShaYmez <76499782+ShaYmez@users.noreply.github.com> --- CHANGELOG.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..b17d08a --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,32 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +### Changed +- Updated Dockerfile base image from Alpine 3.18 to Alpine 3.20 for better compatibility with modern systems +- Updated GitHub Actions workflow to use current versions (checkout@v4, docker/setup-buildx-action@v3, docker/login-action@v3) +- Modernized docker-compose.yml by removing obsolete version field +- Updated Python dependency minimum versions for Debian 13 and Python 3.11/3.12 compatibility: + - bitstring: 3.1.9 → 4.0.0 + - bitarray: 2.3.5 → 2.8.0 + - Twisted: 21.7.0 → 24.0.0 + - configparser: 5.2.0 → 7.0.0 + +### Fixed +- Fixed POSIX compliance in entrypoint script (changed `==` to `=` for shell comparison) +- Added error handling to `cd` command in entrypoint script + +### Security +- Updated all GitHub Actions to latest versions for improved security +- Verified no security vulnerabilities in updated dependencies + +## [1.6.10] - Previous Release + +### Note +- This changelog was added as part of Debian 13 compatibility updates +- For changes prior to this version, please refer to git commit history From d9ed74e99d13a3975923579dc0996a319f8d7c16 Mon Sep 17 00:00:00 2001 From: M0VUB <76499782+ShaYmez@users.noreply.github.com> Date: Sat, 13 Dec 2025 19:04:30 +0000 Subject: [PATCH 35/39] Refactor Dockerfile for improved build process --- Dockerfile | 41 ++++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0a6008d..5d55c27 100755 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,34 @@ +############################################################################### +# Copyright (C) 2024 Shane aka, ShaYmez +# Version 2.0.1 +############################################################################### + FROM python:alpine3.20 -COPY entrypoint /entrypoint +RUN adduser -D -u 54000 radio + +WORKDIR /hblink3 + +# Install build dependencies +RUN apk add --no-cache git gcc musl-dev libffi-dev openssl-dev cargo + +# Copy only requirements first for better layer caching +COPY requirements.txt . -RUN adduser -D -u 54000 radio && \ - apk update && \ - apk add git gcc musl-dev && \ - pip install --upgrade pip && \ - pip cache purge && \ - cd /opt && \ - git clone https://github.com/ShaYmez/hblink3 && \ - cd /opt/hblink3 && \ - pip install --no-cache-dir -r requirements.txt && \ - apk del git gcc musl-dev && \ - chown -R radio: /opt/hblink3 +RUN pip install --upgrade pip \ + && pip install --no-cache-dir -r requirements.txt + +# Remove build dependencies +RUN apk del git gcc musl-dev libffi-dev openssl-dev cargo + +# Copy the application code +COPY . . + +RUN chown -R radio /hblink3 + +COPY entrypoint /entrypoint +RUN chmod +x /entrypoint USER radio -ENTRYPOINT [ "/entrypoint" ] +ENTRYPOINT ["/entrypoint"] From 6c1d71b255e1cd7518f9628ddba86c3ccbcb3f2f Mon Sep 17 00:00:00 2001 From: M0VUB <76499782+ShaYmez@users.noreply.github.com> Date: Sat, 13 Dec 2025 19:05:31 +0000 Subject: [PATCH 36/39] Refactor entrypoint script for improved execution --- entrypoint | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/entrypoint b/entrypoint index 75b49bb..2ebb8d4 100755 --- a/entrypoint +++ b/entrypoint @@ -1,12 +1,10 @@ #!/bin/sh -cd /opt/hblink3 || exit -if [ "$PARROT_ENABLE" = 1 ] -then - echo 'Starting HBlink with Parrot.....' - python /opt/hblink3/bridge.py -c hblink.cfg -r rules.py & - python /opt/hblink3/playback.py -c playback.cfg +if [ "$PARROT_ENABLE" = 1 ]; then + echo 'Starting HBlink with Parrot.....' + python bridge.py -c hblink.cfg -r rules.py & + python playback.py -c playback.cfg else - echo 'Starting HBlink.....' - python /opt/hblink3/bridge.py -c hblink.cfg -r rules.py + echo 'Starting HBlink.....' + exec python bridge.py -c hblink.cfg -r rules.py fi From 07e6cc60e9f72ffc8abb803bc5ccb7b25e977c02 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 14 Dec 2025 01:43:28 +0000 Subject: [PATCH 37/39] Initial plan From fca8cdd6d32f0577ae503966fc4da8e2ef2851ca Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 14 Dec 2025 01:47:37 +0000 Subject: [PATCH 38/39] Update version to 2.0.2 and finalize changelog for stable release Co-authored-by: ShaYmez <76499782+ShaYmez@users.noreply.github.com> --- CHANGELOG.md | 2 ++ Dockerfile | 2 +- version.txt | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b17d08a..4df1be3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [2.0.2] - 2025-12-14 + ### Changed - Updated Dockerfile base image from Alpine 3.18 to Alpine 3.20 for better compatibility with modern systems - Updated GitHub Actions workflow to use current versions (checkout@v4, docker/setup-buildx-action@v3, docker/login-action@v3) diff --git a/Dockerfile b/Dockerfile index 5d55c27..7871799 100755 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ ############################################################################### # Copyright (C) 2024 Shane aka, ShaYmez -# Version 2.0.1 +# Version 2.0.2 ############################################################################### FROM python:alpine3.20 diff --git a/version.txt b/version.txt index 1df3b82..e9307ca 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.6.10 +2.0.2 From f9170687d3f8a728b16d55e98dfc45599c52b419 Mon Sep 17 00:00:00 2001 From: M0VUB <76499782+ShaYmez@users.noreply.github.com> Date: Sun, 14 Dec 2025 02:32:03 +0000 Subject: [PATCH 39/39] Refactor hblink3 service configuration in docker-compose --- docker-compose.yml | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 44adf15..7a87375 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,19 +1,19 @@ services: - hblink3: - container_name: hblink - volumes: - - '/etc/hblink3/hblink.cfg:/opt/hblink3/hblink.cfg' - - '/var/log/hblink/hblink.log:/opt/hblink3/hblink.log' - - '/etc/hblink3/rules.py:/opt/hblink3/rules.py' - - '/etc/hblink3/json/:/opt/hblink3/json/' - ports: - # Master Ports (99 Masters) - - '54000-54099:54000-54099/udp' - # MMDVM & OBP Ports - - '62030-62050:62030-62050/udp' - # TCP Port for HBmonitor - - '4321:4321/tcp' - image: 'shaymez/hblink3:latest' - restart: "unless-stopped" - environment: - - 'PARROT_ENABLE=1' + hblink3: + container_name: hblink + volumes: + - '/etc/hblink3/hblink.cfg:/hblink3/hblink.cfg' + - '/var/log/hblink/hblink.log:/hblink3/hblink.log' + - '/etc/hblink3/rules.py:/hblink3/rules.py' + - '/etc/hblink3/json/:/hblink3/json/' + ports: + # Master Ports (99 Masters) + - '54000-54099:54000-54099/udp' + # MMDVM & OBP Ports + - '62030-62050:62030-62050/udp' + # TCP Port for HBmonitor + - '4321:4321/tcp' + image: 'shaymez/hblink3:latest' + restart: "unless-stopped" + environment: + - 'PARROT_ENABLE=1'