Navigation

  • index
  • next |
  • previous |
  • M0GUY - »
  • 5. Amateur Radio »
  • 5.2.2. DMR »
  • 5.2.2.2. HBLink DMR

5.2.2.2. HBLink DMR¶

5.2.2.2.1. Multiple Talkgroups¶

With some simple changes I’ve been able to enable multiple talkgroups using HBLink as the foundation.

5.2.2.2.2. Building and Running¶

I’ve built this using docker. HBLink does have a “Dockerfile” however the way it’s setup doesn’t work for me, as you have to have a separate repo to store the configurations. I’ve therefore created my own Dockerfile which builds a self contained image.

FROM debian:buster-slim

RUN apt-get update && apt-get install -y git python3-twisted python3-pip \
    python3-bitstring python3-autobahn python3-jinja2 libnet-ifconfig-wrapper-perl \
    procps wget && \
    rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

WORKDIR /opt

ADD https://ham-digital.org/status/DMRIds.dat /opt

RUN pip3 install dmr_utils3 bitstring bitarray configparser

RUN git clone https://github.com/n0mjs710/HBlink3.git
RUN git clone https://github.com/sp2ong/HBmonitor.git

ADD entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

WORKDIR /opt/HBlink3
# copy config
COPY conf/* ./

COPY script/* ./

WORKDIR /opt/
COPY monitor-config.py HBmonitor/config.py

RUN useradd -ms /bin/bash radio && \
    chown radio:radio /entrypoint.sh && \
    chown -R radio /opt

RUN mkdir -p /var/log/hblink/
RUN chown -R radio:radio /var/log/hblink

#USER radio
EXPOSE 62030/udp 62031/udp 42001/udp 8080 9000 8090

ENTRYPOINT [ "/entrypoint.sh" ]

The same container image is then run multiple times

  • HBlink

  • YSF Peer

  • Monitor

Depending on the entrypoint.sh script and command sent defines which function is run.

cd /opt/HBlink3
IPADDR="$(ifconfig eth0 |grep -A 1 'eth0' |tail -1 |cut -d 't' -f 2 |cut -d ' ' -f 2)"
sed -i -e "s/HOSTIP/$IPADDR/g" /opt/YSF2DMR.ini

case "$1" in
  bash)
    bash
    ;;
  hblink)
    python3 raynet.py
#    tail -F /opt/HBlink3/hblink.py
    ;;
  monitor3)
    cd /opt/hbmonitor3
    python3 monitor.py
    ;;
  monitor)
    cd /opt/HBmonitor
    python3 monitor.py
    ;;
  playback)
    python3 playback.py
    ;;
  ysf2dmr)
    wget 'https://ham-digital.org/status/DMRIds.dat' -O /opt/DMRIds.dat
    /opt/YSF2DMR /opt/YSF2DMR.ini
    ;;
  *)
    echo $"Usage: $0 {blink|monitor|monitor3|playback|ysf2dmr}"
    exit 1
esac

Logo

Table of Contents

  • 1. General
  • 2. Security
  • 3. Home Automation
  • 4. Linux
  • 5. Amateur Radio
    • 5.1. Licenses
    • 5.2. Radio Interests
    • 5.3. Logging
  • 6. IOS
  • 7. Projects
  • 8. Solar and Energy Saving
  • 9. Home Alarm Replacement

Quick search

Social

  • Mastodon
  • Twitter

Solar-Terrestrial Data

Navigation

  • index
  • next |
  • previous |
  • M0GUY - »
  • 5. Amateur Radio »
  • 5.2.2. DMR »
  • 5.2.2.2. HBLink DMR
© Copyright 2024, M0GUY. Last updated on Mar 30, 2025.