Choosing the Channel Driver

Important Information(Edit)

To make sure when setting up your node that you have the latest drivers installed, run

vksetup
from the bash shell and make sure you upgrade to the latest version of the channel driver you are using. The channel drivers are a continuously evolving state as things are worked out to be easier and more reliable.

From VKlink version 2 The channel drivers are updated on reboot.

Available drivers(Edit)

There are 3 Channel drivers available for the Raspberry Pi, the first two have been well and truly tested.

The third is still under development and requires some major work before I am happy with it. It connects and does everything it should do, however there is some funny stuff happening with the audio and it drops the PTT too quickly on the other end. But it is usable if someone wants to play.

Editing the Config files(Edit)

Every Config file needed to be edited is able to be done via the Main Setup Menu.

Whenever a change is done to a channel driver file the application should be restarted. The Main Setup Menu does this automatically.

Chan_SimpleUSB(Edit)

This is the driver that works every time, for every version of the Pi. It has basic RX and TX signalling, and a limited amount of audio processing. The configuration file has all the information on setting the channels, with comments explaining it all.

The Most important things here to note is rxboost= and carrierfrom=. These control the RX from your receiver.

;
; SimpleUSB configuration
;
[general]

[usb]

eeprom=0

hdwtype=0		; Leave this set to 0 for USB sound fobs modified using
			; the instructions from the VKLink manual.
 
rxboost=1		; 0 = 20db attenuator inserted, 1= 20db attenuator removed
			; Set to 1 for additonal gain if using a low-level receiver output

carrierfrom=usb	        ; no,usb,usbinvert,rpi,rpiinvert
			; no - no carrier detection at all
			; usb - from the COR line on the modified USB sound fob
			; usbinvert - from the inverted COR line on the modified USB sound fob

ctcssfrom=no		; no,usb,usbinvert,rpi,rpiinvert
			; no - CTCSS decoding, system will be carrier squelch
			; usb - CTCSS decoding using input from USB FOB 
			; usbinvert - from the inverted CTCSS line on the modified USB sound fob

txmixa=voice		; Left channel output: no,voice
			; no - Do not output anything
			; voice - output voice only

txmixb=no		; Right channel output: no,voice,tone,composite, auxvoice
			; See txmixa above.

invertptt=0		; Invert PTT 0 = ground to transmit, 1 = open to transmit
			; This is the collector lead of the 2n4401 on the modified
			; usb sound fob.
			; please refer to the howto for the procedure to do this.

duplex=1		; ***DO NOT TOUCH***   Full Duplex

plfilter=0		; Used in conjunction to block PL tones when used in deemphasis mode

deemphasis=0		; When using flat audio from a receiver

preemphasis=0		; When wanting flat audio into a transmitter.

rxondelay=0;		; Uncomment and/or adjust for simplex nodes to eliminate "Ping Ponging"
			; or "Relay Racing" (or Bloody Button pushers).
			; A positive value here will instruct the usbradio driver to ignore the
			; COR line for a specified number of 20mSec intervals following the
			; release of PTT. Use this only on simplex nodes, and leave commented
			; out for repeaters or other full duplex nodes.

SimpleUSB Update!(Edit)

Now the Simple USB Driver allows Raspberry Pi GPIO use, if you are going to use it you need to add the following lines under the driver heading:

.
.
.
[usb]
piversion2=1                    ; set to 1 for a Raspi B2, 0 for all others
israspi=1			; set to 1 when its a pi, leave at 0 for others
pttpin=4                        ; Transmitter pin
corpin=2                        ; Carrier RX pin
;ctcsspin=3                     ; CTCSS RX pin (in this example it is not used)
.
.

There is also two options added under both carrierfrom and ctcssfrom:

carrierfrom=rpi or rpiinvert
ctcssfrom=rpi or rpiinvert

To use these features, your chan_simpleusb.so needs updating. You can do this through the Main Setup Menu

The rxboost needs to be changed from 0 to 1 if you cannot get enough volume out of the receiver.

The carrierfrom needs to be changed depending on whether your receiver pulls its RX signal to high or low on receive.

For example the yaesu FT8800 goes high on RX so it would be carrierfrom=usb.

To enable the use of simpleusb, the rpt.conf file needs changing to reflect this:

rxchannel = simpleusb/usb

Where usb is the device defined in the configuration file (in the square brackets).

You need processed audio for this driver, ie, just before the audio PA and mic in.

Chan_USBRadio(Edit)

Chan_USBRadio is the higher horsepower driver. It can do DSP receiving and generate and decode subtones.

This driver is enabled by default on the Pi2 software image. This driver will work on the PiB, but will occasionally stutter on audio.

Its configuration file also has annotations for configuring. By using DSP as the receive indicator, it can pull signals below the noise floor.

;**********************************************************

[general]


[usb]
hdwtype=0			; leave as 0 for USB sound fobs modified using
				; the instructions on the VKlink Manual

rxboost=1			; 1 for 20dB boost on the RX stream

txboost=0			; 1 for 20dB boost on the TX stream

rxctcssrelax=1			; leave as 1 

rxctcssfreqs=123.0,91.5		; CTCSS freqs the RX will open with

txctcssfreqs=123.0,91.5		; CTCSS freqs TX will transmit, it will follow RX tx freqs

txctcssdefault=123.0		; Default TX CTCSS, the tails and linking will have this freq

rxctcssoverride=0		; Set to 1 to start in carrier sq mode.

carrierfrom=dsp			; Where the node gets its received signal from options are:
				; no,usb,usbinvert,dsp,vox,rpi,rpiinvert
				; no - no carrier detection at all
				; usb - from the COR line on the modified USB sound fob
				; usbinvert - from the inverted COR line on the modified USB sound fob
				; dsp - from RX noise using dsp techniques
				; vox - voice activated from RX audio

ctcssfrom=dsp			; where the node gets its ctcss from option are:
				; no,dsp,rpi,rpiinvert
				; no - CTCSS decoding, system will be carrier squelch
				; dsp - CTCSS decoding using RX audio in DSP.
				; rxdemod option must be set to flat for this to work.

rxdemod=flat			; input type from radio: no,speaker,flat
				; no - RX audio input not used
				; flat - Use RX audio from discriminator (before de-emphasis)
				; speaker - use de-emphasized audio 

txlimonly=yes			; Audio limiting with no pre-emphasis on output channel: no,yes
				; no - Audio is not limited. 
				; yes - Audio is  limited.
				; Suitable for transmitters with no limiting but with pre-emphasis.

txprelim=yes			; Audio processing on left output channel: no,yes
				; no - Audio is not pre-emphasized and limited. 
				; Suitable for use on a microphone input
				; yes - Audio is pre-emphasized and limited.
				; Suitable for direct connection to an FM modulator

txtoctype=notone		; Transmit tone control type: no,phase,notone
				; no - CTCSS tone encoding with no hang time
				; phase - encode CTCSS and reverse phase 
				; AKA ("reverse burst") before unkeying TX
				; notone - encode CTCSS and stop sending tone before unkeying TX
				; AKA ("chicken burst")

txmixa=composite		; Left channel output: no,voice,tone,composite,auxvoice
				; no - Do not output anything
				; voice - output voice only
				; tone - CTCSS tone only
				; composite - voice and tone
				; auxvoice - auxiliary voice output at headphone level for monitoring
	
txmixb=no			; as above for right channel (not used on our fob)

invertptt=0			; Invert PTT 0 = ground to transmit, 1 = open to transmit
				; This is the collector lead of the 2n4401 on the modified
				; usb sound fob.
				; please refer to the howto for the procedure to do this.
	

rxondelay=0;			; Uncomment and/or adjust for simplex nodes to eliminate "Ping Ponging"
				; or "Relay Racing" (or Bloody Button pushers).
				; A positive value here will instruct the usbradio driver to ignore the
				; COR line for a specified number of 20mSec intervals following the
				; release of PTT. Use this only on simplex nodes, and leave commented
				; out for repeaters or other full duplex nodes.
jbenable=no

jbmaxsize=200

jbresyncthreshold=1000

jbimpl=fixed

jblog=no

duplex=1	

Again, the most important items are the rxboost=, txboost=, and carrierfrom-= items.

USBRadio Update!(Edit)

Now the USB Radio Driver allows Raspberry Pi GPIO use, if you are going to use it you need to add the following lines under the driver heading:

.
.
.
[usb]
piversion2=1                    ; set to 1 for a Raspi B2, 0 for all others
israspi=1			; set to 1 when its a pi, leave at 0 for others
pttpin=17                        ; Transmitter pin
corpin=27                        ; Carrier RX pin
;ctcsspin=3                     ; CTCSS RX pin (in this example it is not used)
.
.

There is also two options added under both carrierfrom and ctcssfrom:

carrierfrom=rpi or rpiinvert
ctcssfrom=rpi or rpiinvert

To use these features, your chan_simpleusb.so needs updating. You can do this through the Main Setup Menu

You enable this driver in rpt.conf by setting

rxchannel=radio/usb

Where usb is the device in the config file.

Chan_RpiRadio(Edit)

This is a completely experimental driver written by VK3VS to use Alsa (instead of OSS), and the GPIO pins on the Raspberry Pi.

'It is in Alpha Stage and requires work and as such, it is not included in the images, but it is downloadable via the Main Setup Menu.

Again the conf file has information on what the settings do. The MOST important setting here is piversion2=

You need to set this to 1 for a Pi B2, and 0 for all others. It can make the Pi unusable if this is wrong as the GPIO's are accessed on Ground floor. There is no pretty software protecting you from them.

The config file has all the options explained and is pretty self explanatory.

[rpi0]

;Sound Card Crap

input_device=plughw:0,0		; ALSA input channel
output_device=plughw:0,0	; ALSA output channel
;silencesuppression=0		; Silence Suppression

;Raspberry Pi Stuff

pttpin=27			; Transmitter pin
corpin=22			; Carrier RX pin
ctcsspin=17			; CTCSS RX pin

invertptt=0			; invert the PTT signal = 1
invertcor=0			; invert the COR signal = 1
invertctcss=0			; invert the CTCSS pin = 1

disablectcss=1			; only use the cor pin

rxboost=0			;


; General config options, with default values shown.
; You should use one section per device, with [general] being used
; for the device.




[general]

piversion2=1			; set to 1 for a Raspi B2, 0 for all others

debug = 0			; misc debug flags, default is 0

;rxondelay=0

;------------------------------ JITTER BUFFER CONFIGURATION --------------------------
; jbenable = yes              ; Enables the use of a jitterbuffer on the receiving side of an
                              ; USBRADIO channel. Defaults to "no". An enabled jitterbuffer will
                              ; be used only if the sending side can create and the receiving
                              ; side can not accept jitter. The USBRADIO channel can't accept jitter,
                              ; thus an enabled jitterbuffer on the receive USBRADIO side will always
                              ; be used if the sending side can create jitter.

; jbmaxsize = 200             ; Max length of the jitterbuffer in milliseconds.

; jbresyncthreshold = 1000    ; Jump in the frame timestamps over which the jitterbuffer is
                              ; resynchronized. Useful to improve the quality of the voice, with
                              ; big jumps in/broken timestamps, usualy sent from exotic devices
                              ; and programs. Defaults to 1000.

; jbimpl = fixed              ; Jitterbuffer implementation, used on the receiving side of an USBRADIO
                              ; channel. Two implementations are currenlty available - "fixed"
                              ; (with size always equals to jbmax-size) and "adaptive" (with
                              ; variable size, actually the new jb of IAX2). Defaults to fixed.

; jbtargetextra = 40          ; This option only affects the jb when 'jbimpl = adaptive' is set.
                              ; The option represents the number of milliseconds by which the new
                              ; jitter buffer will pad its size. the default is 40, so without
                              ; modification, the new jitter buffer will set its size to the jitter
                              ; value plus 40 milliseconds. increasing this value may help if your
                              ; network normally has low jitter, but occasionally has spikes.

; jblog = no                  ; Enables jitterbuffer frame logging. Defaults to "no".
;-----------------------------------------------------------------------------------

Once again, the main concern is the rx pin (corpin) and whether or not it is inverted.

Main page - Wiring to a radio

Menu

Article:

Search: