TheLinkBox software delivered with the R.Net Raspbian Linux is compiled with special Raspberry Pi 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 PTT
In the example R.Net TheLinkBox port configuration file /etc/thelinkbox/port1-GPIO.conf GPIO pin 17 is configured as PTT output pins. Respectively the same pin is initialized as output pin in the Rpi_GPIO_setup.sh -script
GPIO pin 17 is nicknamed as PTT1 to be used with the first radio port, GPIO pin 22 is nicknamed as PTT2 for the optional second radio port.
TheLinkBox GPIO PTT port configuration
The port-specific PTT port is configured in the port configuration file (example /etc/thelinkbox/port1-gpio.conf). The port configuration file is then configured in TheLinkBox general configuration file /etc/thelinkbox/tlb.conf to be loaded up during TheLinkBox startup.
Two parameters in the port configuration file effect the PTT output port media and port number;
TxKeyMethod = 7 selects the Raspberry PI GPIO port mode;
; The following variable selects the method thelinkbox will use to key your ; transmitter: ; ; NB: On FreeBSD RTS is *active* when no program is running, so it's probably ; not a good idea to use RTS for PTT on FreeBSD. ; ; 0 - none ; 1 - WB2REM / VA3TO style serial EchoLink interface boards ; 2 - Parallel port (IRLP interface) ; 3 - RTS ; 4 - DTR ; 5 - USB Audio dongle GPIO ; 6 - PCF8754 I2C port expander on iMic ; 7 - Raspberry Pi GPIO /sys/class/gpio/... method
TxKeyMethod = 7
GpioSysClassID = 17 defines GPIO port 17 to be the PTT output port;
; For Raspberry Pi GPIO method, define the GPIO port for PTT output ; For example 17 for Port1 and 22 for Port2 GpioSysClassId = 17