USBRadio Channel Driver: Difference between revisions

From AllStarLink Wiki
Jump to navigation Jump to search
imported>Bryan
No edit summary
m Point to ASL Manual
 
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Chan_usbradio is a feature rich DSP radio interface.
{{Warning|adv-topics/usbinterfaces/}}


It requires more CPU than chan_simpleusb and therefor chan_simpleusb may be a better choice on smaller computers. Chan_usbradio.conf setting are well documented in the configuration file itself.
chan_usbradio is a feature rich DSP radio interface.  It requires more CPU than [[SimpleUSB Channel Driver]] and therefore [[SimpleUSB Channel Driver]] may be a better choice on smaller computers.  
 
You must enable chan_usbradio.so load in modules.conf.
 
 
=usbradio.conf=
usbradio.conf setting are well documented in the configuration file itself:


<pre>
<pre>
Line 11: Line 17:


[usb]
[usb]
eeprom = 0              ; EEPROM installed: 0,1
                        ; 0 = no (default)
                        ; 1 = yes


hdwtype=0 ; Leave this set to 0 for USB sound fobs modified using
hdwtype = 0 ; Leave this set to 0 for USB sound fobs modified using
; the instructions from usbfob.pdf. Use a setting of  
; the instructions from usbfob.pdf. Use a setting of  
; 1 is for Dingotel/Sph interfaces.
; 1 is for Dingotel/Sph interfaces.
   
   
rxboost=1 ; 0 = 20db attenuator inserted, 1= 20db attenuator removed
rxboost = 1 ; 0 = 20db attenuator inserted, 1= 20db attenuator removed
; Set to 1 for additonal gain if using a low-level receiver output
; Set to 1 for additional gain if using a low-level receiver output


rxctcssrelax=1 ; reduce talkoff from radios w/o CTCSS Tx HPF
rxctcssrelax=1 ; reduce talkoff from radios w/o CTCSS Tx HPF
; Do not change this, leave this as a 1
; Do not change this, leave this as a 1


txctcssdefault=100.0 ; default tx ctcss freq, any frequency permitted
txctcssdefault = 100.0 ; Default TX CTCSS frequency, any frequency permitted
rxctcssfreqs=100.0 ; rx ctcss freqs in floating point. must be in table
rxctcssfreqs = 100.0 ; RX CTCSS frequencies in floating point. This list is comma delimited. Frequency must be in table.
txctcssfreqs=100.0 ; tx ctcss freqs, any frequency permitted
txctcssfreqs = 100.0 ; TX CTCSS frequencies in floating point, any frequency permitted.  This list is comma delimited.  Will follow the RX CTCSS Frequency.
;rxctcssoverride=0 ; Set to 1 or yes to start out in carrier squelch mode
;rxctcssoverride = 0 ; Set to 1 or yes to start out in carrier squelch mode


carrierfrom=dsp ; no,usb,usbinvert,dsp,vox  
carrierfrom = dsp ; no,usb,usbinvert,dsp,vox  
; no - no carrier detection at all
; no - no carrier detection at all
; usb - from the COR line on the modified USB sound fob
; usb - from the COR line on the USB sound fob (Active High)
; usbinvert - from the inverted COR line on the modified USB sound  
; usbinvert - from the inverted COR line on the USB sound (Active Low)
                        ; fob
; dsp - from RX noise using DSP techniques
; dsp - from RX noise using dsp techniques
; vox - voice activated from RX audio
; vox - voice activated from RX audio


ctcssfrom=dsp ; no,usb,dsp
ctcssfrom = dsp ; no,usb,dsp
; no - CTCSS decoding, system will be carrier squelch
; no - no CTCSS decoding, system will be carrier squelch
; usb - CTCSS decoding using input from USB FOB
; usb - from the CTCSS line on the USB sound fob (Active high)
; (currently not supported)
                        ; usbinvert - from the inverted CTCSS line on the USB sound fob (Active low)  
; dsp - CTCSS decoding using RX audio in DSP.
; dsp - CTCSS decoding using RX audio in DSP.
; rxdemod option must be set to flat for this to work.
; rxdemod option must be set to flat for this to work.


rxdemod=flat           ; input type from radio: no,speaker,flat
rxdemod = flat         ; input type from radio: no,speaker,flat
; no - RX audio input not used
; no - RX audio input not used
; flat - Use RX audio from discriminator (before de-emphasis)
; flat - Use RX audio from discriminator (before de-emphasis)
; speaker - use de-emphasized audio  
; speaker - use de-emphasized audio  
rxsquelchdelay = 30    ; delayline in ms carrier squelch tail eliminator


txprelim=yes ; Audio processing on left output channel: no,yes
rxondelay = 0          ; Number of 20mSec intervals following the release of PTT.
                        ; Uncomment and/or adjust for simplex nodes to eliminate "Ping Ponging"
                        ; or "Relay Racing". 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.
 
txoffdelay = 0          ; Ignore the reciever for a specified number of 20 millisecond
                        ; intervals after the transmitter unkeys.
                        ; This is useful when setting up a half-duplex link with an existing
                        ; repeater, where you need to ignore the repeater's hangtime.
 
txboost = 0            ; Add transmitter audio gain boost: 0,1
 
 
txprelim = yes ; Audio processing on left output channel: no,yes
; no - Audio is not pre-emphasized and limited.  
; no - Audio is not pre-emphasized and limited.  
; Suitable for use on a microphone input
; Suitable for use on a microphone input
Line 53: Line 77:
; Suitable for direct connection to an FM modulator
; Suitable for direct connection to an FM modulator


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


txtoctype=notone ; Transmit tone control type: no,phase,notone
txtoctype = notone ; Transmit tone control type: no,phase,notone
; no - CTCSS tone encoding with no hang time
; no - CTCSS tone encoding with no hang time
; phase - encode CTCSS and reverse phase  
; phase - encode CTCSS and reverse phase  
Line 65: Line 89:
; AKA ("chicken burst")
; AKA ("chicken burst")


txmixa=composite ; Left channel output: no,voice,tone,composite,auxvoice
txmixa = composite ; Left channel output: no,voice,tone,composite,auxvoice
; no - Do not output anything
; no - Do not output anything
; voice - output voice only
; voice - output voice only
Line 72: Line 96:
; auxvoice - auxiliary voice output at headphone level for monitoring
; auxvoice - auxiliary voice output at headphone level for monitoring


txmixb=no ; Right channel output: no,voice,tone,composite, auxvoice
txmixb = no             ; Right channel output: no,voice,tone,composite, auxvoice
; See txmixa above.
                        ; 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
 
; Audio filters - requires version newer than ASL_1.01
rxlpf = 0              ; Receiver Audio Low Pass Filter 0,1 2
                        ; 0 - 3.0 kHz cutoff (Default) value for reduced noise and increased intelligibility.
                        ; 1 - 3.3 kHz cutoff for increased high end, sibilance and brightness.
                        ; 2 - 3.5 kHz cutoff for even more high end, sibilance and brightness.
rxhpf = 0              ; Receiver Audio High Pass Filter 0,1
                        ; 0 - 300 Hz cutoff. (Default) value to reduce sub-audible signals for retransmission and in the receiver speaker.
                        ; 1 - 250 Hz cutoff for additional received and retransmitted bass response.
                        ; recommend using this filter with a CTCSS tone no higher than 186.2 Hz.
txlpf = 0              ; Transmitter Audio Low Pass Filter 0,1
                        ; 0 - 3.0 kHz cutoff. (Default) value.
                        ; 1 - 3.3 kHz cutoff for increased high end, sibilance and brightness.
txhpf = 0              ; Transmitter Audio High Pass Filter 0,1,2
                        ; 0 - 300 Hz cutoff. (Default) value to reduce interference between voice and sub-audible signaling tones and codes.
                        ; 1 - 250 Hz cutoff for increased bass response in transmitted audio.
                        ; 2 - 120 Hz cutoff for special applications requiring additional bass response in transmitted audio.
                        ; Not recommended due to the increased possibility of voice energy interfering with sub-audible signaling
 
 
invertptt = 1          ; Invert PTT: 0,1
                        ; 0 - ground to transmit
                        ; 1 - open to transmit
 
duplex = 0              ; Duplex 0,1
                        ; 0 - half duplex
                        ; 1 - full duplex
 
duplex3 = 0            ; duplex 3 gain setting (0 to disable)
                        ; when enabled, connects the receive audio from the sound card directly to the transmit audio.
 
</pre>
 
=Configuration=
==Parallel Port==
When setting chan_usbradio to use a parallel port for I/O you must set a definition for the port address in rpt.conf:
 
<pre>
iobase=0x378    ; Parallel port address (using for cor/ptt & switches +dh-rbi  - 378,278,3bc common Lpt 1,2,3
</pre>
 
You must then define the parallel port pins used for I/O in usbradio.conf:
 
<pre>
[usb]
pp6=ptt
pp11=cor
</pre>
== Node Number Configuration ==
 
When configuring your usbradio node you '''''MUST''''' ensure that the name of the radio is the same in both rpt.conf and usbradio.conf. 
 
Node names are in format of ''usb_<nodenumber>''.  Where <nodenumber> = the AllStar Link node of your system.  ''Note that usb and the node number are separated by an underscore (_) character.''
 
Example:<p>
Your usbraido.conf file defines your usb radio as '''[usb_1000]'''. 
 
Your rpt.conf file would then have:


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


duplex=1 ; Full Duplex
If you are reusing the usbradio.conf file from an older installation (i.e., ACID), take special note of the change in naming.  chan_usbradio may not work without first making this change to your usbradio.conf file.


;rxondelay=20 ; Uncomment and/or adjust for simplex nodes to eliminate "Ping
==Sound Card Audio Buffers==
                        ; Ponging" or "Relay Racing".
On some systems, the sound card driver buffers may need to be adjusted.  If you see messages like ''soundcard_writeframe: Channel usb_1999: Sound device write buffer overflow - used 6 blocks'', the number of allocated buffers is not sufficient.  Increasing the '''queuesize''' may be needed.
; 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.


The following entries can be added to usbradio.conf.
<pre>
queuesize = 20              ; number of buffers
frags = 1966092            ; request 30 buffers (fragments) of size 4096
</pre>
</pre>


[[Category:Configuration Files]]
'''queuesize''' specifies the maximum number of driver buffers that can be used before reporting a buffer overflow.  This value should be 1 less than the number of buffers requested with '''frags'''.  The default value is 20.
 
'''frags''' specifies the number of buffers and buffer size to allocate.  This is a 4-byte value.  The first 2-bytes specify the number of buffers.  The second 2-bytes specify the size of the buffer.  The buffer size is 2 raised to the value specified. 
 
The default frags value is '''001E000C''' hex (1966092 decimal).  '''001E''' is 30 decimal.  This asks for 30 buffers.  '''000C''' is 12 decimal.  This requests 2 raised to the power of 12, which is 4096 bytes.  The value 1966092 decimal (001E000C hex) requests that the sound card driver give chan_usbradio 30 buffers that are 4096 bytes in length.
 
The '''queuesize''' should always be greater than 1.
 
=Miscellaneous=
==Parallel Port Pin Numbers==
More information regarding numbering of parallel port hardware pins to their software equivalents can be found at [https://wiki.allstarlink.org/wiki/SimpleUSB_Channel_Driver#Parallel_Port_Pin_Numbers Parallel Port Pin Numbers]
 
[[Category:Node Configuration]]

Latest revision as of 23:36, 29 June 2024

Legacy Version - This page is about a legacy version of AllStarLink. See https://allstarlink.github.io/adv-topics/usbinterfaces/

chan_usbradio is a feature rich DSP radio interface. It requires more CPU than SimpleUSB Channel Driver and therefore SimpleUSB Channel Driver may be a better choice on smaller computers.

You must enable chan_usbradio.so load in modules.conf.


usbradio.conf

usbradio.conf setting are well documented in the configuration file itself:

;
; Usbradio channel driver Configuration File
;

[general]

[usb]
eeprom = 0              ; EEPROM installed: 0,1
                        ; 0 = no (default)
                        ; 1 = yes

hdwtype = 0		; Leave this set to 0 for USB sound fobs modified using
			; the instructions from usbfob.pdf. Use a setting of 
			; 1 is for Dingotel/Sph interfaces.
 
rxboost = 1		; 0 = 20db attenuator inserted, 1= 20db attenuator removed
			; Set to 1 for additional gain if using a low-level receiver output

rxctcssrelax=1		; reduce talkoff from radios w/o CTCSS Tx HPF
			; Do not change this, leave this as a 1

txctcssdefault = 100.0	; Default TX CTCSS frequency, any frequency permitted
rxctcssfreqs = 100.0	; RX CTCSS frequencies in floating point.  This list is comma delimited. Frequency must be in table.
txctcssfreqs = 100.0	; TX CTCSS frequencies in floating point, any frequency permitted.  This list is comma delimited.  Will follow the RX CTCSS Frequency.
;rxctcssoverride = 0	; Set to 1 or yes to start out in carrier squelch mode

carrierfrom = dsp	; no,usb,usbinvert,dsp,vox 
			; no - no carrier detection at all
			; usb - from the COR line on the USB sound fob (Active High)
			; usbinvert - from the inverted COR line on the USB sound (Active Low)
			; dsp - from RX noise using DSP techniques
			; vox - voice activated from RX audio

ctcssfrom = dsp		; no,usb,dsp
			; no - no CTCSS decoding, system will be carrier squelch
			; usb - from the CTCSS line on the USB sound fob (Active high)
                        ; usbinvert - from the inverted CTCSS line on the USB sound fob (Active low) 
			; 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 
rxsquelchdelay = 30     ; delayline in ms carrier squelch tail eliminator 

rxondelay = 0           ; Number of 20mSec intervals following the release of PTT.
                        ; Uncomment and/or adjust for simplex nodes to eliminate "Ping Ponging"
                        ; or "Relay Racing". 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.

txoffdelay = 0          ; Ignore the reciever for a specified number of 20 millisecond
                        ; intervals after the transmitter unkeys.
                        ; This is useful when setting up a half-duplex link with an existing
                        ; repeater, where you need to ignore the repeater's hangtime.

txboost = 0             ; Add transmitter audio gain boost: 0,1


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

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.

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             ; Right 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

; Audio filters - requires version newer than ASL_1.01
rxlpf = 0               ; Receiver Audio Low Pass Filter 0,1 2
                        ; 0 - 3.0 kHz cutoff (Default) value for reduced noise and increased intelligibility.
                        ; 1 - 3.3 kHz cutoff for increased high end, sibilance and brightness.
                        ; 2 - 3.5 kHz cutoff for even more high end, sibilance and brightness.
rxhpf = 0               ; Receiver Audio High Pass Filter 0,1
                        ; 0 - 300 Hz cutoff. (Default) value to reduce sub-audible signals for retransmission and in the receiver speaker.
                        ; 1 - 250 Hz cutoff for additional received and retransmitted bass response.
                        ; recommend using this filter with a CTCSS tone no higher than 186.2 Hz.
txlpf = 0               ; Transmitter Audio Low Pass Filter 0,1
                        ; 0 - 3.0 kHz cutoff. (Default) value.
                        ; 1 - 3.3 kHz cutoff for increased high end, sibilance and brightness.
txhpf = 0               ; Transmitter Audio High Pass Filter 0,1,2
                        ; 0 - 300 Hz cutoff. (Default) value to reduce interference between voice and sub-audible signaling tones and codes.
                        ; 1 - 250 Hz cutoff for increased bass response in transmitted audio.
                        ; 2 - 120 Hz cutoff for special applications requiring additional bass response in transmitted audio.
                        ; Not recommended due to the increased possibility of voice energy interfering with sub-audible signaling


invertptt = 1           ; Invert PTT: 0,1 
                        ; 0 - ground to transmit
                        ; 1 - open to transmit

duplex = 0              ; Duplex 0,1
                        ; 0 - half duplex
                        ; 1 - full duplex

duplex3 = 0             ; duplex 3 gain setting (0 to disable) 
                        ; when enabled, connects the receive audio from the sound card directly to the transmit audio.

Configuration

Parallel Port

When setting chan_usbradio to use a parallel port for I/O you must set a definition for the port address in rpt.conf:

iobase=0x378     ; Parallel port address (using for cor/ptt & switches +dh-rbi  - 378,278,3bc common Lpt 1,2,3

You must then define the parallel port pins used for I/O in usbradio.conf:

[usb]
pp6=ptt
pp11=cor

Node Number Configuration

When configuring your usbradio node you MUST ensure that the name of the radio is the same in both rpt.conf and usbradio.conf.

Node names are in format of usb_<nodenumber>. Where <nodenumber> = the AllStar Link node of your system. Note that usb and the node number are separated by an underscore (_) character.

Example:

Your usbraido.conf file defines your usb radio as [usb_1000]. Your rpt.conf file would then have:

rxchannel = radio/usb_1000

If you are reusing the usbradio.conf file from an older installation (i.e., ACID), take special note of the change in naming. chan_usbradio may not work without first making this change to your usbradio.conf file.

Sound Card Audio Buffers

On some systems, the sound card driver buffers may need to be adjusted. If you see messages like soundcard_writeframe: Channel usb_1999: Sound device write buffer overflow - used 6 blocks, the number of allocated buffers is not sufficient. Increasing the queuesize may be needed.

The following entries can be added to usbradio.conf.

queuesize = 20              ; number of buffers
frags = 1966092             ; request 30 buffers (fragments) of size 4096

queuesize specifies the maximum number of driver buffers that can be used before reporting a buffer overflow. This value should be 1 less than the number of buffers requested with frags. The default value is 20.

frags specifies the number of buffers and buffer size to allocate. This is a 4-byte value. The first 2-bytes specify the number of buffers. The second 2-bytes specify the size of the buffer. The buffer size is 2 raised to the value specified.

The default frags value is 001E000C hex (1966092 decimal). 001E is 30 decimal. This asks for 30 buffers. 000C is 12 decimal. This requests 2 raised to the power of 12, which is 4096 bytes. The value 1966092 decimal (001E000C hex) requests that the sound card driver give chan_usbradio 30 buffers that are 4096 bytes in length.

The queuesize should always be greater than 1.

Miscellaneous

Parallel Port Pin Numbers

More information regarding numbering of parallel port hardware pins to their software equivalents can be found at Parallel Port Pin Numbers