The hblink.cfg file is the main configuration for HBlink3. It is broken down into several sections, and I will explain each section and what it is used for. Let’s get started by opening hblink.cfg with the nano editor
If you have never used nano, it is a simple text editor. Using the arrow keys on your keyboard scroll down to the first section [Global].
For the most part we will leave this section how it is with a few minor changes.
Path is the main path for HBLink, we will leave it as it is.
PING_TIME: Is the amount of time between pings to a connected device. we will change this value to 20. That will give us 20 seconds between each ping. You could leave it at 3 but I have found that a minor network issue will cause the connected devices to dropped by HBLink.
MAX_MISSED: Is the amount of pings a device is allowed to miss before HBLink drops the device. The default is 3, but I also set this number to 20, for the same reason as the PING_TIME adjustment.
ACL section: we will leave this section how it is. ACL is Access Control List and can be used for to allow or deny users based on the users DMR ID. If you need more information on ACL and how to use them head over to google. For most Servers the default settings is the best.
This section is used if you are going to configure an HBMonitor to view the status and operation of your HBLink Server. I will not go into this section now as it is covered in another How To on setting up HBMonitor.
This section is how HBLink will produce the log files for your Server. You can leave it as the default and it will work just fine. I however have a few recommend tweaks. I would not leave the files in the /tmp/hblink.log, I would move that do your logging directory of /var/log/. I would then make a directory named hblink. So the LOG_FILE would look like /var/log/hblink/hblink.log.
The next item to adjust would be the LOG_HANDLERS as you can see by reading the comments, there are several options you could use. By default it is only set to console-timed. I normally add file-timed. To do that change the LOG_HANDLERS to look like this.
The LOG_LEVEL is used to define the level of the logs you will get. By default it is set to DEBUG, which is good when you are first getting started and trying to find out why something is not working. Once you have the system setup, I would change that do INFO. In the comments there is a list of values you can set it to, depending on what you are needing.
For the most part you do not need to make any adjustments for the Aliases section. It will automatically download the json files. These files are only used for the logging system. The only thing you will need to adjust will be the STALE_DAYS. That defines how often HBLink should check for fresh copies of the downloaded files. Because I don’t watch my log files very often I usually adjust this to 999 days.
Now we are starting to get into the nuts and bolts of the HBLink configuration file. This section will allow you to define any and all OpenBridge connections to your Server. If you are not familiar with the OpenBridge protocol developed by Brand Meister, you can get more information on their wiki page at https://wiki.brandmeister.network/index.php/Open_Bridge.
If you plain on accessing any talkgroups on the Brand Meister Network, you will need to setup an OpenBridge connection to them. To do this just log in to your Brand Meister Account and submit a support ticket. You will need to provide them with the IP Address of your server, your DMR ID and which talkgroups you want access to. Once the ticket is completed the will send you the information you need to use to setup the OpenBridge on your side. I will give you one word of warning. It is possible to setup a PEER connection to Brand Meister (see below), but don’t do it. Brand Meister’s policy regarding their network prohibits PEER connections from HBLink. If they find out you have setup a PEER connection you will run the risk of being removed from the Brand Meister Network. So don’t do it, use an OpenBridge connection instead.
OpenBridges can also be used to connect 2 HBLink Server together so I will go through the settings for you.
This is the system name. It will be used in the rules.py file. If you have multiple OpenBridge Stanza’s you must name each one with a unique name. For clarity, I would name each one by it’s purpose. Keep the name in upper case and no spaces.
Mode this connection will use, in this case OPENBRIDGE
Enables and Disables this connection True for enabled, False for Disabled.
For the most part, leave blank. Would be used if you had multiple interfaces, you then specify the IP Address you want the inbound connection to use.
This is the port used for the other side of this OpenBridge. You can use the same port number for inbound and outbound. If you decide to use 2 different port numbers, be sure to flip them on the other side.
This will normally be your DMR ID, you can add 2 digits to the end of your id to make it unique.
This will be the passphrase, it will be the same for both sides of this OpenBridge.
This will be the IP Address of the remote HBLink Server or the IP Address of the Brand Meister Server you are connecting to.
This turn on and off the use of ACL’s. True is on and False is off.
This will allow you to Deny or accept subscribers based on their ID. If set to DENY: any ID entered will be blocked. If set to PERMIT: any ID entered will only be permitted. You can also set it to PERMIT:ALL or DENY:ALL to accept or block all. If you enter ID’s, this is a comma separated list.
This acts the same as SUB_ACL, but only with TG ID’s. Normally would leave the default setting of PERMIT:ALL, but if you need to block a TG ID that is being passed by the OpenBridge, then you could use DENY: and the list of TG ID’s to be blocked. As with the SUB_ACL, this is a comma separated list.
The next section we will talk about it the Masters section. You need to think of Master connections as inbound connections. This could be a Hotspot device or even a connection from an XLX Server or Reflector. It is basically devices connecting to your HBLink. In the rules section we will talk more about how a Master Connection is used. For now we will go through each of the settings as we did with the OpenBridge.
This is the system name. It will be used in the rules.py file. If you have multiple Master Stanza’s you must name each one with a unique name. For clarity, I would name each one by it’s purpose. Keep the name in upper case and no spaces
This is the mode for this connection, will be set to MASTER.
Enable or Disable this MASTER connection. True to Enable, False to Disable.
You will normally leave this to True. This setting will determine if the traffic coming across this connection will be repeated to the group in the Conference Bridge this system is used in. If set to False, than any traffic will not be repeated to the group.
This is the Maximum number of PEER Connections this Master will handle. Something to keep in mind when setting up Master Connections, is that each PEER will behave the same. So if you have 10 PEERS connected to this 1 master all the PEERS will be connected to the same Talkgroup in the Conference Bridge. It is best if each PEER connection has a their own MASTER connection. More on this when we get to the rules.
This is used to Export the AMBE Audio, normally left at False.
Just like the OpenBridge Stanza, you will normally leave this blank. Unless you have multiple IP Address on your server and need to specify which IP Address is to be used.
This is the port to be used by the PEERs. Each MASTER should use it’s own port number. If you are creating a public connection to your HBLink Server, you would use the standard port of 62031.
This is the passphrase each PEER will use to get authenticated by the MASTER.
This is how long HBLink will hold a Talkgroup before it will accept any new Talkgroups. For example, if you are talking on TG 1 and want to move to TG 2, you will have to wait 5 seconds before moving to the new Talkgroup. This value is in seconds, I normally set this to 1.
Just like the OpenBridge, this will turn on and off ACLs. True is on and False if off.
REG_ACL is used for Radio ID’s, just like in the SUB_ACL, you and PERMIT or DENY by Radio ID for this MASTER Connection.
See OpenBridge SUB_ACL for explanation.
This works the same as the OpenBridge TGID_ACL, the only difference is this will only PERMIT or DENY Talkgroups on Time Slot 1.
This is just like TGID_TS1_ACL, except it will work on Time Slot 2.
The last section we will talk about in the hblink.cfg file is the PEER connections. This connection is used as an outbound connection. You use a PEER connection to connect to another HBLink Server, another network that allows PEER Connections, or to an XLX Server. I will once again warn you about setting up a PEER Connection to Brand Meister, simply don’t do it. Don’t be intimated by the size of this section, like before I will break everything down for you, so you understand what each line in the Stanza means. Take a deep breath and let’s get started.
Just like before, this is the system name for this PEER Connection. Each PEER connection must have it’s own name.
For a PEER Connection there are 2 types of MODES. The first as shown here PEER. This is used to connect to other HBLink Servers or Networks. The second type is XLXPEER, this is used to connect to an XLX Server.
This Enables and Disables this PEER connection True is on and False is off.
Loose has 2 options, False for off and True for on. When set to True, this will relax the validation on packets recevied from the master. You will end up turn this on for XLX Servers or Networks like DMR+
This is used to Export the AMBE Audio, normally left at False.
Just like the OpenBridge and Master Stanza, you will normally leave this blank. Unless you have multiple IP Address on your server and need to specify which IP Address is to be used.
This is an internal port HBLink will use. Each PEER Connection will need it’s own port number.
This is the IP Address of the MASTER you are connecting to. This could be another HBLink server, XLX server or other DMR Network.
This is the port number to use when connecting to a remote Master.
This is the passphrase that will be used to authentic with the remote Master.
This will be your Ham Radio Callsign. If you are setting this HBLink Server up as a Club Server and your Club has a Club Call, then you can use it here. Just make sure your Club as a DMR ID associated with the Club Call.
This will be your DMR ID. If you are make multiple connection to the same Remote Master you can add 2 digits to the end of your DMR ID, just make sure it is unique.
A PEER connection will look like a repeater to the Master so you can set the RX Freq of your station. It is required to be here, but it does not really matter what it is set to.
This is the same as the RX_FREQ, does not matter what it is set to, as long as it is there.
Like the TX and RX Freq you can set this to any value you like, or just leave it as it is.
As you should know, DMR uses a colorcode, you should not change this value regardless of what colorcode you use in your radios.
This defines how many Time Slots you are going to use. DMR can use 2 Time Slots, and because this connection looks like a Repeater you can access to both Time Slots. Use 1 for 1 TS 1, 2 for TS2 or the best option is 3 for both Time Slots.
This is just like the RX and TX Freq, you can put the Latitude for your station or leave it to the default value, it is required so don’t remove it.
Again, this looks like a Repeater to the Master so this would be your antenna height, does not really matter what you use, just as long as it is there.
LOCATION: Anywhere, USA
Yep, you guessed it by now. Does not matter what you use as long as it is there. One difference with this setting is that if you have a monitor on the Master this value will show up on your dashboard so you can use this field to show where the server is or your station location.
DESCRIPTION: This is a cool repeater
Just a description field, you can leave it to default or but some short notes about this PEER connection.
Just enter a valid URL for your Website or point it to your QRZ page.
This is the Software ID for HBLink, just leave it alone.
This is the Package ID for HBLink, no need to change it.
This is just like the other Group Hangtime setting we have already talked about. You can leave it at the default setting, I normally change it to 1.
For the most part if you are connecting to another HBLink, you will leave this blank. If you are connecting to an XLX Reflector via a PEER Connection you can put which Module you want to connect to by default. If this stanza is set to XLXPEER instead of PEER, then you need to change this field to XLXOPTIONS: then you can define which module to connect to using the number of 4001-4027. 4001 would be A, 4002 would be B and so on.
This behaves just like it did in the MASTER Stanza, so I will not repeat it here. So see the MASTER for details.
See the MASTER Stanza
See the MASTER Stanza
See the MASTER Stanza
That will cover the hblink.cfg file. We have covered the basics of how this config is set and how to make changes to fit the system you are building. We are not done yet. In the next section we will talk about the rules.py file and how it works. If you are still in the nano editor you can press CTRL-O to save your changes and then CTRL-X to exit out of the nano editor.