Parrot and HBlink3


JeffH - W4JEW
 

@Beaker - I’ve found that one of the leading causes for making it difficult to find information buried in message boards - threads that go off on tangents due to hijacking. :-)

First - I will not take credit for this as it was a combination of Kevin Halton (KA1MXL) and an article that I found on SP2ONG’s website that helped me get this working. Thanks to Google Chrome translation to convert SP2ONG's content!!!

I‘m running Parrot on HBlink3 (no point in covering HBlink for Parrot since HBlink is deprecated).

This assumes that you already have bridge.py (in HBlink3) running and configured with a valid hblink.cfg (or equivalent config file) and rules.py to control the traffic. If you do not, then "don't pass go". Make sure you are able to confirm you can connect a hotspot to the server and you can access another hotspot at the very least. It sounds like you're covered there based on what you shared in your comment in my other thread.

Also, all of my logs are stored under /var/log/hblink/

Once I created that folder, I issued 'sudo touch /var/log/hblink/LOGNAME' before starting any service for the first time to ensure the service doesn't run into an issue with the initial creation of the log file. You may choose to do differently. This is my personal preference.

WARNING - at this time, everything in this example assumes running as 'root' which is NOT advised! I'm providing examples in this manner to ensure that you don't run into issues with permissions. Follow examples as provided by others in some of the various threads that show how to modify the services such that they run in the context of traditional user accounts!!! This includes changing the permissions on logging so the user has the ability to write to the logs! You have been warned!!!

There are 4 things that need to be done in order to get Parrot working:

1. Configure playback.cfg and test by running playback.py in conjunction with playback.cfg to ensure there are no issues
2. Add a "PEER" stanza to hblink.cfg file for Parrot
3. Add a stanza to rules.py for the Parrot PEER with corresponding entries for your hotspots
4. Create a service for Parrot to have it start automatically

Step 1

My playback.cfg looks like this:

[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/api/dmr/user/?State=Georgia
STALE_DAYS: 7

[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


Test by running 'sudo /usr/bin/python3 /opt/HBlink3/playback.py'

Watch the logs to ensure there are no errors!

NOTES:
Even though Reports is set to "disabled", I changed the port number from 4321 to 4323 to ensure it would never conflict with bridge.py and HBmonitor3 in the event it was inadvertently turned on.
Additionally, I didn't see there was any need for playback.py to download any of the files from RadioID.net since bridge.py was already doing the job.


Step 2

My hblink.cfg PEER stanza for Parrot looks like this:

[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: DMRGateway-20190702
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

 

Step 3

I have a stanza in my rules.py for Parrot as follows (assuming the TGID is 9999):

    '9999 (Local) - Parrot': [

            {'SYSTEM': 'Hotspot-01',     'TS': 2, 'TGID': 9999,   'ACTIVE': True, 'TIMEOUT': 0,  'TO_TYPE': 'NONE',  'ON

': [9999],  'OFF': [],     'RESET': []},

            {'SYSTEM': 'Hotspot-02',     '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': []},

        ]

I didn't want users to have to key up to activate Parrot, then key up again and transmit, so I left mine set up as full time. You may choose to do something different.

This is the final stanza in my rules.py hence the trailing ] ends without a comma on the end. If you have other stanzas before/after the Parrot stanza, you will need to add a comma after the trailing ].

Of course run /usr/bin/python3 /opt/HBlink3/rules.py separately to check your work!

Step 4

I created a file with the name 'parrot.service' and added the following:

[Unit]

Description=HBlink3 Parrot

After=network-online.target syslog.target
Wants=network-online.target

[Service]

StandardOutput=null
WorkingDirectory=/opt/HBlink3
RestartSec=3
ExecStart=/usr/bin/python3 /opt/HBlink3/playback.py -c /opt/HBlink3/playback.cfg
Restart=on-abort

[Install]

WantedBy=multi-user.target

 

I copied that file under /lib/systemd/system/

Then issued:

'sudo systemctl daemon-reload'
'sudo systemctl enable parrot.service'
'sudo systemctl start parrot.service'
'sudo systemctl status parrot.service' (also works without sudo - I'm just a creature of habit)


Monitor your logs and make sure you see that bridge.py is able to talk to playback.py as well as doesn't see any issues with rules.py.

--
Jeff Hochberg
W4JEW
Atlanta, GA


Beaker
 

Thank you for taking the time to explain this.  I know how frustrating it is to be someone who knows what is going on and have to explain it to someone who doesn't.  Sometimes I feel like I am sitting in the car turning the steering wheel, wondering why the car won't move - but I have no idea where the gas pedal is or that it even exists at all...  Just takes someone who knows what they are looking at to come along and shed some light. 

I will play around with this some more tomorrow.  FWIW, I am running hblink.py, not bridge.py if that makes any difference.  My goal is to set up a private network in a hub/spoke configuration that allows distributed hotspots to communicate through a central DMR server.  I've got that working but I want to enable the playback functionality.  Thanks again.


JeffH - W4JEW
 

It’s my pleasure. Don’t worry about me having to explain it. It was actually the first time I’ve explained it and I intentionally created a new thread with an appropriate subject line. 

I’m still very new to DVSwitch and have invested a lot of time in trying to do my due diligence to research the way to set things up but it can be a bit like trying to find a pin in a haystack. 

I’m not 100% sure my configuration is the most optimal way of setting things up but it’s working for me. 


Unfortunately there are indeed people who get frustrated with having to repeat themselves. I totally get it.


It does create a situation where people are like a turtle having to pull their head back into their shell for fear of getting ripped apart. That’s truly a shame that it happens but it does.

I’m not one of those people. Of course if you haven’t done your homework, I would be first to push back and provide suggestions on where to look. 


Please let me know if you run into any challenges and I’ll do my best to help you. Especially let me know if things worked out for you! I like hearing when things are working so I know I’ve helped out!


There are plenty of people here that have set this up as well. Hopefully they are willing to add their $0.02.

I did mention that I want to help build a wiki/documentation for HBlink3. I still plan to but I have a lot on my plate. I will do what I can when I can.

73,

-JeffH  


--
Jeff Hochberg
W4JEW
Atlanta, GA


JeffH - W4JEW
 
Edited

@Beaker

One more thing - I sincerely wonder if that is your real name or if you’re a fan of The Muppets! :-)

Please look me up on QRZ and reach out when you have a chance. 


--
Jeff Hochberg
W4JEW
Atlanta, GA


Beaker
 

lol Beaker is a nickname given to me by some college buddies for ... reasons. 

Will do!


Iogdaly@...
 

Hi guys, thank you for your comments, very helpful.

 

As my first project I am trying to run a Parrot only using a hotspot but I got stuck in the first step .

I am using Jeff’s  playback.cfg file but after running   “python3 /opt/HBlink3/playback.py” I got the below:

 

Traceback (most recent call last):

  File "/opt/HBlink3/playback.py", line 181, in <module>

    CONFIG = config.build_config(cli_args.CONFIG_FILE)

AttributeError: module 'config' has no attribute 'build_config'

 

 

Could you please advise?

 

Thanks

 

Nacho – EA2AIV

 

From: HBlink@DVSwitch.groups.io <HBlink@DVSwitch.groups.io> On Behalf Of JeffH
Sent: 02 April 2020 21:15
To: HBlink@DVSwitch.groups.io
Subject: [HBlink] Parrot and HBlink3

 

@Beaker - I’ve found that one of the leading causes for making it difficult to find information buried in message boards - threads that go off on tangents due to hijacking. :-)

First - I will not take credit for this as it was a combination of Kevin Halton (KA1MXL) and an article that I found on SP2ONG’s website that helped me get this working. Thanks to Google Chrome translation to convert SP2ONG's content!!!

I‘m running Parrot on HBlink3 (no point in covering HBlink for Parrot since HBlink is deprecated).

This assumes that you already have bridge.py (in HBlink3) running and configured with a valid hblink.cfg (or equivalent config file) and rules.py to control the traffic. If you do not, then "don't pass go". Make sure you are able to confirm you can connect a hotspot to the server and you can access another hotspot at the very least. It sounds like you're covered there based on what you shared in your comment in my other thread.

Also, all of my logs are stored under /var/log/hblink/

Once I created that folder, I issued 'sudo touch /var/log/hblink/LOGNAME' before starting any service for the first time to ensure the service doesn't run into an issue with the initial creation of the log file. You may choose to do differently. This is my personal preference.

WARNING - at this time, everything in this example assumes running as 'root' which is NOT advised! I'm providing examples in this manner to ensure that you don't run into issues with permissions. Follow examples as provided by others in some of the various threads that show how to modify the services such that they run in the context of traditional user accounts!!! This includes changing the permissions on logging so the user has the ability to write to the logs! You have been warned!!!

There are 4 things that need to be done in order to get Parrot working:

1. Configure playback.cfg and test by running playback.py in conjunction with playback.cfg to ensure there are no issues
2. Add a "PEER" stanza to hblink.cfg file for Parrot
3. Add a stanza to rules.py for the Parrot PEER with corresponding entries for your hotspots
4. Create a service for Parrot to have it start automatically

Step 1

My playback.cfg looks like this:

[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/api/dmr/user/?State=Georgia
STALE_DAYS: 7

[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


Test by running 'sudo /usr/bin/python3 /opt/HBlink3/playback.py'

Watch the logs to ensure there are no errors!

NOTES:
Even though Reports is set to "disabled", I changed the port number from 4321 to 4323 to ensure it would never conflict with bridge.py and HBmonitor3 in the event it was inadvertently turned on.
Additionally, I didn't see there was any need for playback.py to download any of the files from RadioID.net since bridge.py was already doing the job.


Step 2

My hblink.cfg PEER stanza for Parrot looks like this:

[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: DMRGateway-20190702
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

 

Step 3

I have a stanza in my rules.py for Parrot as follows (assuming the TGID is 9999):

    '9999 (Local) - Parrot': [

            {'SYSTEM': 'Hotspot-01',     'TS': 2, 'TGID': 9999,   'ACTIVE': True, 'TIMEOUT': 0,  'TO_TYPE': 'NONE',  'ON

': [9999],  'OFF': [],     'RESET': []},

            {'SYSTEM': 'Hotspot-02',     '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': []},

        ]

I didn't want users to have to key up to activate Parrot, then key up again and transmit, so I left mine set up as full time. You may choose to do something different.

This is the final stanza in my rules.py hence the trailing ] ends without a comma on the end. If you have other stanzas before/after the Parrot stanza, you will need to add a comma after the trailing ].

Of course run /usr/bin/python3 /opt/HBlink3/rules.py separately to check your work!

Step 4

I created a file with the name 'parrot.service' and added the following:

[Unit]

Description=HBlink3 Parrot

After=network-online.target syslog.target
Wants=network-online.target

[Service]

StandardOutput=null
WorkingDirectory=/opt/HBlink3
RestartSec=3
ExecStart=/usr/bin/python3 /opt/HBlink3/playback.py -c /opt/HBlink3/playback.cfg
Restart=on-abort

[Install]

WantedBy=multi-user.target

 

I copied that file under /lib/systemd/system/

Then issued:

'sudo systemctl daemon-reload'
'sudo systemctl enable parrot.service'
'sudo systemctl start parrot.service'
'sudo systemctl status parrot.service' (also works without sudo - I'm just a creature of habit)


Monitor your logs and make sure you see that bridge.py is able to talk to playback.py as well as doesn't see any issues with rules.py.

--
Jeff Hochberg
W4JEW
Atlanta, GA


N3MEL - Glenn
 

Does anyone have an updated parrot.service file for Debian64, when I set the service as listed here I get "file or directory" not found on line /usr/bin/python3 (but yet it is there)?


area51now@...
 

If your tying to get the playback (aka parrot)  in  hblink to work on your HBlink3 , add the below along with rules for whatever talkgroup
you want to use to activate it then run: python3 HBlink3/playback.py -c playback.cfg

add the below to your hblink.cfg

[Parrot-1]    
MODE: PEER
ENABLED: True
LOOSE: False
EXPORT_AMBE: False
IP:
PORT: 54111
MASTER_IP:  127.0.0.1  
MASTER_PORT: 54112    
PASSPHRASE: passw0rd     
CALLSIGN: PARROT       
RADIO_ID: 312000   
RX_FREQ: 449000000  
TX_FREQ: 444000000
TX_POWER: 25
COLORCODE: 1
SLOTS: 3
LATITUDE: 38.0000
LONGITUDE: -095.0000
HEIGHT: 75
LOCATION: Group-call 9990
DESCRIPTION: This is a cool repeater
URL: www.w1abc.org
SOFTWARE_ID: 20170620
PACKAGE_ID: MMDVM_HBlink
GROUP_HANGTIME: 5
OPTIONS:
USE_ACL: True
SUB_ACL: DENY:1
TGID_TS1_ACL: PERMIT:ALL
TGID_TS2_ACL: PERMIT:ALL

then create another config file with the below  to drop in your hblink3  folder and name it: playback.cfg

 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
#           - how often the Master maintenance loop runs
# MAX_MISSED - how many pings are missed before we give up and re-register
#           - number of times the master maintenance loop runs before de-registering a peer
#
# ACLs:
#
# Access Control Lists are a very powerful tool for administering your system.
# But they consume packet processing time. Disable them if you are not using them.
# But be aware that, as of now, the configuration stanzas still need the ACL
# sections configured even if you're not using them.
#
# REGISTRATION ACLS ARE ALWAYS USED, ONLY SUBSCRIBER AND TGID MAY BE DISABLED!!!
#
# The 'action' May be PERMIT|DENY
# Each entry may be a single radio id, or a hypenated range (e.g. 1-2999)
# Format:
#     ACL = 'action:id|start-end|,id|start-end,....'
#        --for example--
#    SUB_ACL: DENY:1,1000-2000,4500-60000,17
#
# ACL Types:
#     REG_ACL: peer radio IDs for registration (only used on HBP master systems)
#     SUB_ACL: subscriber IDs for end-users
#     TGID_TS1_ACL: destination talkgroup IDs on Timeslot 1
#     TGID_TS2_ACL: destination talkgroup IDs on Timeslot 2
#
# ACLs may be repeated for individual systems if needed for granularity
# Global ACLs will be processed BEFORE the system level ACLs
# Packets will be matched against all ACLs, GLOBAL first. If a packet 'passes'
# All elements, processing continues. Packets are discarded at the first
# negative match, or 'reject' from an ACL element.
#
# If you do not wish to use ACLs, set them to 'PERMIT:ALL'
# TGID_TS1_ACL in the global stanza is used for OPENBRIDGE systems, since all
# traffic is passed as TS 1 between OpenBridges
[GLOBAL]
PATH: ./
PING_TIME: 5
MAX_MISSED: 3
USE_ACL: True
REG_ACL: PERMIT:ALL
SUB_ACL: DENY:1
TGID_TS1_ACL: PERMIT:ALL
TGID_TS2_ACL: PERMIT:ALL


# NOT YET WORKING: NETWORK REPORTING CONFIGURATION
#   Enabling "REPORT" will configure a socket-based reporting
#   system that will send the configuration and other items
#   to a another process (local or remote) that may process
#   the information for some useful purpose, like a web dashboard.
#
#   REPORT - True to enable, False to disable
#   REPORT_INTERVAL - Seconds between reports
#   REPORT_PORT - TCP port to listen on if "REPORT_NETWORKS" = NETWORK
#   REPORT_CLIENTS - comma separated list of IPs you will allow clients
#       to connect on. Entering a * will allow all.
#
# ****FOR NOW MUST BE TRUE - USE THE LOOPBACK IF YOU DON'T USE THIS!!!****
[REPORTS]
REPORT: True
REPORT_INTERVAL: 60
REPORT_PORT: 4322
REPORT_CLIENTS: 127.0.0.1


# SYSTEM LOGGER CONFIGURAITON
#   This allows the logger to be configured without chaning the individual
#   python logger stuff. LOG_FILE should be a complete path/filename for *your*
#   system -- use /dev/null for non-file handlers.
#   LOG_HANDLERS may be any of the following, please, no spaces in the
#   list if you use several:
#       null
#       console
#       console-timed
#       file
#       file-timed
#       syslog
#   LOG_LEVEL may be any of the standard syslog logging levels, though
#   as of now, DEBUG, INFO, WARNING and CRITICAL are the only ones
#   used.
#
[LOGGER]
LOG_FILE: /tmp/hblink.log
LOG_HANDLERS: console-timed,file-timed
LOG_LEVEL: INFO
LOG_NAME: HBlink

# DOWNLOAD AND IMPORT SUBSCRIBER, PEER and TGID ALIASES
# Ok, not the TGID, there's no master list I know of to download
# This is intended as a facility for other applcations built on top of
# HBlink to use, and will NOT be used in HBlink directly.
# STALE_DAYS is the number of days since the last download before we
# download again. Don't be an ass and change this to less than a few days.
[ALIASES]
TRY_DOWNLOAD: True
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: 7

# OPENBRIDGE INSTANCES - DUPLICATE SECTION FOR MULTIPLE CONNECTIONS
# OpenBridge is a protocol originall created by DMR+ for connection between an
# IPSC2 server and Brandmeister. It has been implemented here at the suggestion
# of the Brandmeister team as a way to legitimately connect HBlink to the
# Brandemiester network.
# It is recommended to name the system the ID of the Brandmeister server that
# it connects to, but is not necessary. TARGET_IP and TARGET_PORT are of the
# Brandmeister or IPSC2 server you are connecting to. PASSPHRASE is the password
# that must be agreed upon between you and the operator of the server you are
# connecting to. NETWORK_ID is a number in the format of a DMR Radio ID that
# will be sent to the other server to identify this connection.
# other parameters follow the other system types.
#
# ACLs:
# OpenBridge does not 'register', so registration ACL is meaningless.
# OpenBridge passes all traffic on TS1, so there is only 1 TGID ACL.
# Otherwise ACLs work as described in the global stanza

# MASTER INSTANCES - DUPLICATE SECTION FOR MULTIPLE MASTERS
# HomeBrew Protocol Master instances go here.
# IP may be left blank if there's one interface on your system.
# Port should be the port you want this master to listen on. It must be unique
# and unused by anything else.
# Repeat - if True, the master repeats traffic to peers, False, it does nothing.
#
# MAX_PEERS -- maximun number of peers that may be connect to this master
# at any given time. This is very handy if you're allowing hotspots to
# connect, or using a limited computer like a Raspberry Pi.
#
# ACLs:
# See comments in the GLOBAL stanza
[MASTER-1]
MODE: MASTER
ENABLED: True
REPEAT: False
MAX_PEERS: 10
EXPORT_AMBE: False
IP:
PORT: 54112
PASSPHRASE: passw0rd
GROUP_HANGTIME: 5
USE_ACL: True
REG_ACL: DENY:1
SUB_ACL: DENY:1
TGID_TS1_ACL: PERMIT:ALL
TGID_TS2_ACL: PERMIT:ALL


Bob
KB6LED


N3MEL - Glenn
 

Thank you for the info, will give it a try!


On Sun, Oct 11, 2020 at 12:03 PM area51now via groups.io <area51now=aol.com@groups.io> wrote:
If your tying to get the playback (aka parrot)  in  hblink to work on your HBlink3 , add the below along with rules for whatever talkgroup
you want to use to activate it then run: python3 HBlink3/playback.py -c playback.cfg

add the below to your hblink.cfg

[Parrot-1]    
MODE: PEER
ENABLED: True
LOOSE: False
EXPORT_AMBE: False
IP:
PORT: 54111
MASTER_IP:  127.0.0.1  
MASTER_PORT: 54112    
PASSPHRASE: passw0rd     
CALLSIGN: PARROT       
RADIO_ID: 312000   
RX_FREQ: 449000000  
TX_FREQ: 444000000
TX_POWER: 25
COLORCODE: 1
SLOTS: 3
LATITUDE: 38.0000
LONGITUDE: -095.0000
HEIGHT: 75
LOCATION: Group-call 9990
DESCRIPTION: This is a cool repeater
URL: www.w1abc.org
SOFTWARE_ID: 20170620
PACKAGE_ID: MMDVM_HBlink
GROUP_HANGTIME: 5
OPTIONS:
USE_ACL: True
SUB_ACL: DENY:1
TGID_TS1_ACL: PERMIT:ALL
TGID_TS2_ACL: PERMIT:ALL

then create another config file with the below  to drop in your hblink3  folder and name it: playback.cfg

 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
#           - how often the Master maintenance loop runs
# MAX_MISSED - how many pings are missed before we give up and re-register
#           - number of times the master maintenance loop runs before de-registering a peer
#
# ACLs:
#
# Access Control Lists are a very powerful tool for administering your system.
# But they consume packet processing time. Disable them if you are not using them.
# But be aware that, as of now, the configuration stanzas still need the ACL
# sections configured even if you're not using them.
#
# REGISTRATION ACLS ARE ALWAYS USED, ONLY SUBSCRIBER AND TGID MAY BE DISABLED!!!
#
# The 'action' May be PERMIT|DENY
# Each entry may be a single radio id, or a hypenated range (e.g. 1-2999)
# Format:
#     ACL = 'action:id|start-end|,id|start-end,....'
#        --for example--
#    SUB_ACL: DENY:1,1000-2000,4500-60000,17
#
# ACL Types:
#     REG_ACL: peer radio IDs for registration (only used on HBP master systems)
#     SUB_ACL: subscriber IDs for end-users
#     TGID_TS1_ACL: destination talkgroup IDs on Timeslot 1
#     TGID_TS2_ACL: destination talkgroup IDs on Timeslot 2
#
# ACLs may be repeated for individual systems if needed for granularity
# Global ACLs will be processed BEFORE the system level ACLs
# Packets will be matched against all ACLs, GLOBAL first. If a packet 'passes'
# All elements, processing continues. Packets are discarded at the first
# negative match, or 'reject' from an ACL element.
#
# If you do not wish to use ACLs, set them to 'PERMIT:ALL'
# TGID_TS1_ACL in the global stanza is used for OPENBRIDGE systems, since all
# traffic is passed as TS 1 between OpenBridges
[GLOBAL]
PATH: ./
PING_TIME: 5
MAX_MISSED: 3
USE_ACL: True
REG_ACL: PERMIT:ALL
SUB_ACL: DENY:1
TGID_TS1_ACL: PERMIT:ALL
TGID_TS2_ACL: PERMIT:ALL


# NOT YET WORKING: NETWORK REPORTING CONFIGURATION
#   Enabling "REPORT" will configure a socket-based reporting
#   system that will send the configuration and other items
#   to a another process (local or remote) that may process
#   the information for some useful purpose, like a web dashboard.
#
#   REPORT - True to enable, False to disable
#   REPORT_INTERVAL - Seconds between reports
#   REPORT_PORT - TCP port to listen on if "REPORT_NETWORKS" = NETWORK
#   REPORT_CLIENTS - comma separated list of IPs you will allow clients
#       to connect on. Entering a * will allow all.
#
# ****FOR NOW MUST BE TRUE - USE THE LOOPBACK IF YOU DON'T USE THIS!!!****
[REPORTS]
REPORT: True
REPORT_INTERVAL: 60
REPORT_PORT: 4322
REPORT_CLIENTS: 127.0.0.1


# SYSTEM LOGGER CONFIGURAITON
#   This allows the logger to be configured without chaning the individual
#   python logger stuff. LOG_FILE should be a complete path/filename for *your*
#   system -- use /dev/null for non-file handlers.
#   LOG_HANDLERS may be any of the following, please, no spaces in the
#   list if you use several:
#       null
#       console
#       console-timed
#       file
#       file-timed
#       syslog
#   LOG_LEVEL may be any of the standard syslog logging levels, though
#   as of now, DEBUG, INFO, WARNING and CRITICAL are the only ones
#   used.
#
[LOGGER]
LOG_FILE: /tmp/hblink.log
LOG_HANDLERS: console-timed,file-timed
LOG_LEVEL: INFO
LOG_NAME: HBlink

# DOWNLOAD AND IMPORT SUBSCRIBER, PEER and TGID ALIASES
# Ok, not the TGID, there's no master list I know of to download
# This is intended as a facility for other applcations built on top of
# HBlink to use, and will NOT be used in HBlink directly.
# STALE_DAYS is the number of days since the last download before we
# download again. Don't be an ass and change this to less than a few days.
[ALIASES]
TRY_DOWNLOAD: True
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: 7

# OPENBRIDGE INSTANCES - DUPLICATE SECTION FOR MULTIPLE CONNECTIONS
# OpenBridge is a protocol originall created by DMR+ for connection between an
# IPSC2 server and Brandmeister. It has been implemented here at the suggestion
# of the Brandmeister team as a way to legitimately connect HBlink to the
# Brandemiester network.
# It is recommended to name the system the ID of the Brandmeister server that
# it connects to, but is not necessary. TARGET_IP and TARGET_PORT are of the
# Brandmeister or IPSC2 server you are connecting to. PASSPHRASE is the password
# that must be agreed upon between you and the operator of the server you are
# connecting to. NETWORK_ID is a number in the format of a DMR Radio ID that
# will be sent to the other server to identify this connection.
# other parameters follow the other system types.
#
# ACLs:
# OpenBridge does not 'register', so registration ACL is meaningless.
# OpenBridge passes all traffic on TS1, so there is only 1 TGID ACL.
# Otherwise ACLs work as described in the global stanza

# MASTER INSTANCES - DUPLICATE SECTION FOR MULTIPLE MASTERS
# HomeBrew Protocol Master instances go here.
# IP may be left blank if there's one interface on your system.
# Port should be the port you want this master to listen on. It must be unique
# and unused by anything else.
# Repeat - if True, the master repeats traffic to peers, False, it does nothing.
#
# MAX_PEERS -- maximun number of peers that may be connect to this master
# at any given time. This is very handy if you're allowing hotspots to
# connect, or using a limited computer like a Raspberry Pi.
#
# ACLs:
# See comments in the GLOBAL stanza
[MASTER-1]
MODE: MASTER
ENABLED: True
REPEAT: False
MAX_PEERS: 10
EXPORT_AMBE: False
IP:
PORT: 54112
PASSPHRASE: passw0rd
GROUP_HANGTIME: 5
USE_ACL: True
REG_ACL: DENY:1
SUB_ACL: DENY:1
TGID_TS1_ACL: PERMIT:ALL
TGID_TS2_ACL: PERMIT:ALL


Bob
KB6LED



--
Be safe

Glenn R. Allison
N3MEL
DMR, TGIF TG #450 
Wires-x Room #62729
YSF Ref# 59210


area51now@...
 

oh and make sure whatever talk group # you use to activate it make it a group call

Bob