Setup your own DMR Network with HBLink3

Wraping it all up

At this point we have walked through the installation and the basic setup of HBLink, now it is time to fire it up. Before we do you need to make sure you have changed the rules.py file. The sample file will not work and will not allow HBLink to start up. If you have not already done this, take a few minutes and do it now.

The first thing we want to do is start HBLink at the command line to make sure it will start and there are no errors. Make sure you are still logged in as the root user in the /opt/HBlink3 directory and issue the follow command.

python3 ./bridge.py

Once you press the enter key, you will get something like what is pictured below.

Your output may more may not look just like mine, but the import part is the last line pictured — SYSTEM STARTING –, and as long as there are no major errors and it does not exit out, congratulations you have a working HBLink3 Server.

Depending on how you have rules.py and your hblink.cfg file configured, it may continue to show more lines of the log file to you. At this point you can continue to run it this way, but of course there is a better way.

Autostart HBLink3

The final thing we will want to do is have HBLink Autostart. I am sure you don’t want to have to log into the server to start HBLink, so we need to create a service file for HBLink. That will allow it to run in the background and if your server gets rebooted HBLink will restart.

Make sure you are still the root user and enter the follow command to get to the right directory.

cd /lib/systemd/system

In this directory we want to create a new service file with the following command.

nano hblink.service

That command will create the new service file. As long as you have followed my directions, then you can copy/paste the following.

[Unit]
Description=Start HBLink
After=multi-user.target

[Service]
ExecStart=/usr/bin/python3 /opt/HBlink3/bridge.py

[Install]
WantedBy=multi-user.target

Save this file by pressing CTRL-O, then press CTRL-X to exit nano. The next thing we need to do is enable our new service file by entering the following command.

systemctl enable hblink.service

The next thing we need to so is register our service file by entering.

systemctl daemon-reload

Now that we have all the pieces need together, let start are service with the follow command.

systemctl start hblink

Next we need to make sure it actually started.

systemctl status hblink

That command will show you a bunch of stuff as pictured below. The key thing you want to look for is the Active line, it should look like the one below. If it shows failed, then it will show you the error message and the reason it failed. Fix what needs to be fixed then try starting it again.

Some other useful commands you should know about are the following.

systemctl restart hblink   --- Used to restart the service
systemctl stop hblink      --- Stops HBlink

In Conclusion

I know that this post became long, but we have covered a lot of information. At this point you should have a working HBLink Server. Now the fun really begins.

If you run into trouble, you can always search the internet or head over to https://groups.io and do a search HBLink, you will find a large amount of post about HBlink.

I really hope this post has helped you, feel free to leave a comment below. Be sure to check back, as I will be adding new How To’s for different things you can add to your HBLink Server.

Thanks for Reading and Enjoy

Rich (KD7LMN)

Leave a Reply

Your email address will not be published. Required fields are marked *