TheLinkBox software delivered with the R.Net Raspbian Linux is compiled with special GPIO support.

The GPIO ports can be used as radio port PTT and COS signals to interface with the connected radio and also to radio port PL (CTCSS) detection signal from an external CTCSS decoder. Furthermore, available GPIO pins can be used to control radio squelch level, steer channels etc.

Raspberry Pi GPIO COS (Squelch detect)

A simple transistor buffer circuit can be used to interface the Raspberry Pi GPIO pin input to a radio COS (squelch) circuit. The circuit expects that the COS signal provided is active high.

In the example R.Net TheLinkBox port configuration file /etc/thelinkbox/port1-GPIO.conf GPIO pin 18 is configured as COS input pin. Respectively the same pin is initialized as input pin in the Rpi_GPIO_setup.sh -script

GPIO pin 18 is nicknamed as COS1 to be used with the first radio port, GPIO pin 23 is nicknamed as COS2 for the optional second radio port.

TheLinkBox port configuration with Raspberry Pi GPIO COS method

The port-specific COS port is configured in the port configuration file (example /etc/thelinkbox/port1-gpio.conf). The port configuration file is then configured in the TheLinkBox general configuration file /etc/thelinkbox/tlb.conf to be loaded up during TheLinkBox startup.

Two parameters in the port configuration file effect the COS input port media and port number.

To enable correct polarity of the COS signal (active low), a invert parameter is set active;

By default (without the variable ’InvertCOS’ set active, the signals are active high but with Raspberry Pi 3.3V TTL logic, this is difficult to arrange due to high voltage levels of connected peripherals. A buffer circuit is recommended to protect the GPIO ports from overvoltage

; Set this variable to invert the sense of the COS_Bit; For Raspberry GPIO, inverted sense means Logic '0' is active stateInvertCOS = 1