SkillAgentSearch skills...

Thelinkbox

Ham radio repeater controller / Voip linking application

Install / Use

/learn @skiphansen/Thelinkbox
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Welcome to thelinkbox, a member of the CQiNet family.

https://github.com/skiphansen/thelinkbox

Support: https://groups.io/g/thelinkbox/topics

Thelinkbox is an voice over IP (VoIP) radio linking package for ham radio operators that runs under FreeBSD and Linux, and hopefully other Posix compatible operating systems. It does not and probably never will run under Windows.

Thelinkbox is basically thebridge conferencing software with additional code to interface to radios. Although the primary purpose is for VoIP linking of a limited number of repeaters "off grid", i.e. separate from the EchoLink and IRLP networks it can also be used on the Echolink or IRLP networks when properly configurated.

Unlike some other VoIP systems thelinkbox also supports multiple radio ports. The ultimate goal is for thelinkbox to become a full featured multiport hub or repeater controller as well as a VoIP application. I believe the use of USB audio dongles under Linux will allow a modern PC to support a larger number of radio ports than are likely to be needed by even the largest repeater groups (> 16 ports), although I have yet to test the limit in practice.

Here are some features:

  1. Support for multiple simultaneous connections using different codecs and protocols. Currently tlb supports ADPCM and GSM codecs and the Echolink, RTP, and Speak freely protocols. When multiple sources are active the audio is mixed.

  2. The number of VoIP connections is limited only by system RAM and available bandwidth.

  3. The number of physical radio ports is limited only by available hardware, OS hardware support and CPU processing power.

  4. All ports are completely independent: Each port may have a unique set of DTMF commands. Each port can be connected to a distinct VoIP clients.

  5. A full cross point matrix of connections between VoIP clients and RF ports is supported.

  6. Does not require the use of a central server or authentication authority, all that is required is internet connectivity.

  7. Support for either prerecorded PCM audio announcements or external text to speech systems such as Festival.

  8. CW and voice IDs.

  9. Flexible general purpose telemetry tone generator that can be assigned to various events and/or used by scripts.

  10. "Permanent" connections, if a link is lost tlb will keep trying to reconnect indefinitely.

  11. Builtin software based DTMF and CTCSS encoders and decoders.

  12. Open source software written in C and C++.

  13. Support for inexpensive USB audio dongles including PTT, COS and CTCSS sense and frequency control.

Updating from previous versions of thelinkbox

New versions of thelinkbox are usually backwards compatible with configuration files from earlier releases HOWEVER new configuration file variables are added frequently. Since the sample tlb.conf.sample file includes documentation on features which are not mentioned elsewhere it is worthwhile to review the sample configuration file with each release to discover new capabilities which you may want to take advantage of.

Portability

A quick word on portability: I've tried to the best of my ability and means to make thelinkbox as portable as possible. I've tested it under several versions of FreeBSD and Linux, however ALL testing has been on the Intel x86 architecture.

I've found that sound programming on Linux platforms can be very problematic.
Results are very dependent on the sound board and its driver. At least 50% of the sounds cards I've tested with had some issues that required special workarounds such as extra driver options. Additionally for portability thelinkbox uses the OSS sound system API supported by many platforms, not the Linux specific ALSA sounds system. Luckily the ALSA sound system includes an emulated OSS API for backwards compatibility.

At this time the USB subsystem is Linux specific. I tried to make the USB code portable by using libusb but I've run into a show stopper on FreeBSD, namely if the USB audio device is claimed by the kernel's audio driver then libusb is unable to access the device.

Building on a *nix:

Executive summary: (the usual)

"tar xzf thelinkbox-{VERSION}.tgz"
"cd thelinkbox-{VERSION}"
"./bootstrap.sh
"./configure" (or "./configure --enable-usb")
"make"
<edit the configuration files>
<test>
"make install"
<start the daemon>

Requirements:

The only known requirement to build thelinkbox is the GNU GCC C compiler, the GNU GPP C++ compiler or something compatible, a make program and a Bourne shell to run the configure script. GNU make is not required, any old make should be fine. I tried to avoid the use of exotic compiler features, hopefully any version of GCC will work.

On Debian, and perhaps other distributions:

apt-get update
apt-get install build-essential automake

If for some reason either configure or the make should fail please send me the details and I'll try to help you correct the problem.

Extract: The distribution tar file extracts into a version specific subdirectory so different releases do not conflict with each other. Substitute the actual version number for "{VERSION}" above. The ".tgz" extension signifies a Gzip'ed TAR file.

GNU configure: Thelinkbox uses a GNU autoconfig generated configuration script to generate a site-specific Makefile that is then used to build thelinkbox. The configuration script is written to be as portable as possible by only assuming the availability of the most generic Bourne shell features. A suitable shell should be available on just about every *nix system. It will certainly be available on any system using other GNU tools.

The configuration script provides a great deal of flexibility in the way the target program is built and installed, run "./configure --help" for the gory details. Luckily most of the features are seldom needed and running configure without any options is usually sufficient.

If you want to use an USB audio dongle for an interface specify the --enable-usb option when you run configure. In this case will need to have the libusb and it's header files installed on your system.

If you have the GNU readline library (libreadline) you can configure to tlbcmd to use it by specifing the --with-readline switch. The readline library adds features such as command history and curses based line editing tlbcmd and tlbchat.

Once the configure script has been run you should have a config.h and Makefile appropriate for your system.

Make: The generated makefile provides several useful targets, the default "all" builds thelinkbox and utilities. The other frequently used targets include "install", "clean", "distclean", and "uninstall".

There shouldn't be any errors or warnings displayed during the build process for the core source files. I've included several open source libraries with thelinkbox to try to prevent "dependency hell", some of those libraries generate warnings. If you get warnings or errors in the core source files I'd be interested in hearing about them.

The final output of the build process is the thelinkbox daemon "tlb" which is built in the linkbox subdirectory. We'll test it before installing it.
Before we test it we need to edit the configuration files.

thelinkbox Configuration

A least two text files "tlb.conf" and "tlb.cmds" that are needed to configure thelinkbox. The first file can contain all of the configuration necessary other than the mapping of DTMF digits to actions that are taken when the DTMF digits are received. The second file contains the mapping of DTMF digits to commands.

The port configuration can be included in the main file if desired, but it's probably cleaner and less confusing to have one configuration file per port. The port configuration files are then included from the main configuration file by use of the "include" directive.

The files files "tlb.conf.sample" and "tlb.cmds.sample" are provided as a starting point for your configuration files. Since the sample files include documentation on features that are not mentioned elsewhere it is worthwhile to review the sample configuration file with each release to discover new capabilities which you may want to take advantage of.

There are sample port configuration files for compatible interfaces included in the release, just make N copies of that file that matches the type of interface you will be using and them modify them as needed.

Fire up your favorite editor and change the various variables to appropriate values. Refer to the comments in the file for guidance.

cd /usr/local/etc
cp tlb.conf.sample tlb.conf
cp tlb.cmds.sample tlb.cmds
cp iMic.conf.sample Port1.conf
vi tlb.conf
vi tlb.cmds
vi Port1.conf
cp irlp.conf.sample Port2.conf
vi Port2.conf
cp cm108.conf.sample Port3.conf
vi Port3.conf

Lines beginning with ';' or '#' are comments, if you decide to set any of the optional settings be sure to delete leading ';' character before the configuration variable.

Since daemons are not connected to any console they must communicate with the sysop in some other manner. As with most *nix daemons thelinkbox can use the syslog system. Thelinkbox uses "LOG_LOCAL5" as the facility when opening the log and generates messages with priorities LOG_INFO, LOG_WARNING and LOG_ERR. It's up to the user to decide which message if any he wants to log, but unless you are a psychic I would strongly suggest that at least the LOG_ERR messages be logged.

Thelink box can also generate a local log file without using the syslog system. This has many advantages and is the recommended method. The configuration file variable LogFileRolloverType controls the logging method.

Determining physical USB Addresses

If you are not using multiple USB audio dongles you can safely ignore this section.

Since most USB audio dongles do not have a unique serial numbers we must r

View on GitHub
GitHub Stars26
CategoryDevelopment
Updated7mo ago
Forks4

Languages

C

Security Score

87/100

Audited on Sep 5, 2025

No findings