SimpleUSB Channel Driver: Difference between revisions

From AllStarLink Wiki
Jump to navigation Jump to search
imported>Kg7qin
m Kg7qin moved page Chan simpleusb to SimpleUSB Channel Driver: Renaming to match format used for echolink channel driver page
m For testing, too many sss's were adding. Fixing the URL
 
(15 intermediate revisions by 5 users not shown)
Line 1: Line 1:
chan_simpleusb is ideal for smaller computers and those systems that do not need the chan_usbradio driver.
{{Warning|adv-topics/usbinterfaces/}}
 
chan_simpleusb is ideal for smaller computers and those systems that do not need the [[USBRadio Channel Driver]].
 
You must enable chan_simpleusb.so load in modules.conf.


=simpleusb.conf=
=simpleusb.conf=
Line 9: Line 13:
[general]
[general]


[usb]
[usb_<node#>]


eeprom=0
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
hdwtype = 0                        ; Leave this set to 0 for USB sound fobs modified using
                         ; Set to 1 for additonal gain if using a low-level receiver output
                                    ; the instructions from usbfob.pdf. Use a setting of
                                    ; 1 is for Dingotel/Sph interfaces.


carrierfrom=usbinvert  ; no,usb,usbinvert
rxboost = 0                        ; 0 = 20db attenuator inserted, 1= 20db attenuator removed
                        ; no - no carrier detection at all
                                    ; Set to 1 for additonal gain if using a low-level receiver output
                        ; usb - from the COR line on the modified USB sound fob
                        ; usbinvert - from the inverted COR line on the modified USB sound fob


ctcssfrom=usbinvert            ; no,usb,usbinvert
carrierfrom = usbinvert            ; no,usb,usbinvert
                        ; no - CTCSS decoding, system will be carrier squelch
                                    ; no - no carrier detection at all
                        ; usb - CTCSS decoding using input from USB FOB
                                    ; usb - from the COR line on the USB sound fob (Active high)
                        ; usbinvert - from the inverted CTCSS line on the modified USB sound fob
                                    ; usbinvert - from the inverted COR line on the USB sound fob (Active low)


txmixa=voice            ; Left channel output: no,voice,tone,composite,auxvoice
ctcssfrom = usbinvert              ; no,usb,usbinvert
                        ; no - Do not output anything
                                    ; no - CTCSS decoding, system will be carrier squelch
                        ; voice - output voice only
                                    ; usb - CTCSS decoding using input from USB sound fob (Active high)
                                    ; usbinvert - from the inverted CTCSS line on the USB sound fob (Active low)
deemphasis = no                    ; enable de-emphasis (input from discriminator)


txmixb=no              ; Right channel output: no,voice,tone,composite, auxvoice
plfilter = yes                      ; enable PL filter
                        ; See txmixa above.


invertptt=0             ; Invert PTT 0 = ground to transmit, 1 = open to transmit
rxondelay = 0                  ; Number of 20mSec intervals following the release of PTT.
                        ; This is the collector lead of the 2n4401 on the modified
    ; Uncomment and/or adjust for simplex nodes to eliminate "Ping Ponging"
                         ; usb sound fob.
    ; or "Relay Racing". A positive value here will instruct the usbradio
                        ; please refer to the howto for the procedure to do this.
    ; 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.
 
txmixa = voice                      ; Left channel output (A): no,voice
                                    ; no - Do not output anything
                                    ; voice - output voice only
 
txmixb = no                        ; Right channel output (B): no,voice
                                    ; no - Do not output anything
                                    ; voice - output voice only
 
txboost = 0
 
invertptt = 0                       ; Invert PTT: 0,1
                                    ; 0 - ground to transmit
                                    ; 1 - open to transmit
 
preemphasis = 0                    ; Perform standard 6db/octave pre-emphasis
 
; pager = no                        ; no,a,b (e.g. pager = b means "put the normal repeat audio on channel A, and the pager audio on channel B")
 
duplex3 = 0                         ; duplex 3 gain setting (0 to disable)
                                    ; when enabled, connects the receive audio from the sound card directly to the transmit audio.


duplex=1                ; Full Duplex
</pre>
</pre>


Line 56: Line 86:


<pre>
<pre>
[usb]
[usb_<node#1>] ( ie [usb_1234] )
pp6=ptt
pp6=ptt
pp15=ctcss  (valid ctcss signal from ext hardware 0/5v)
pp11=cor
pp11=cor
carrierfrom=ppinvert (could also be ctcss or ctcssinvert or pp)
...(+ additional info for this nodes usb config)...
[usb_<node#2>]
pp7=ptt
pp12=cor
pp14=ctcss
carrierfrom=ctcss
</pre>
</pre>
...(+ additional info for this nodes usb config)...


== Node Number Configuration ==
When configuring your simpleusb radio node you '''''MUST''''' ensure that the name of the radio is the same in both rpt.conf and simpleusb.conf.   
When configuring your simpleusb radio node you '''''MUST''''' ensure that the name of the radio is the same in both rpt.conf and simpleusb.conf.   
The system looks inside the file SimpleUSB.conf for the match of the node# to be configured (i.e. usb_1234).


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.''
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.''
Line 72: Line 114:
</pre>
</pre>


If you are reusing the simpleusb.conf file from an older installation (i.e., ACID), take special note of the change in naming.  chan_simpleusb may not work without first making this change to your simpleusb.conf file.
If you are reusing the simpleusb.conf file from an older installation (i.e., ACID), take special note of the change in naming.  When a exact match is not made, the settings that follow will not be loaded.
 
==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.
 
<pre>
queuesize = 5              ; number of buffers
frags = 1966092            ; request 30 buffers (fragments) of size 4096
</pre>
 
'''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 5.
 
'''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_simpleusb 30 buffers that are 4096 bytes in length.
 
The '''queuesize''' should always be greater than 1.
 
=Miscellaneous=
Parallel Port Addressing:
 
A line is required in your node stanza in RPT.conf to access the parallel port in the software.
 
iobase=0x378    ; Parallel port address
 
Settings are 0x378 = LPT1, 0x278 = LPT2, 0x3bc = LPT3
 
You can have more than one, but you need to place them in other node stanza's addressed separately.
Note: Some older systems plug and play can have issues addressing these. If so, go to bios setup and address them manually.
This will prevent the system from changing the address.
 
==Parallel Port Pin Numbers==
Additional note on parallel port pin numbers:
 
When you are looking at the '''pp#''' addressing, the actual hardware pin numbers are in computer natural logical format.<br>
So hardware pin '''''D0''''' on the LPT port is equal to '''''pp1''''' in the software configuration.<br>
 
"0" is the first number to a computer as seen at the BIOS and/or hardware addressing.<br>
Be sure you are testing/setting/attaching the correct pin number.
 
Here is a listing of hardware pins and the software setup equivalents:
 
{| class="wikitable"
! Hardware pin !! Software equivalent
|-
|  D0 || pp1
|-
|  D1 || pp2
|-
|  D2 || pp3
|-
|  D3 || pp4
|-
|  D4 || pp5
|-
|  D5 || pp6
|-
|  D6 || pp7
|-
|  D7 || pp8
|}
 
Allstar denoted pins pp9 through pp12 are 'Input pins' listed as 'A#' in the parallel port scheme.
 
Special note: All these pins require 'buffering' by adding a transistor to do the actual switching.
They will not sink much current on their own.
While these port pins vary, most will only sink about 20ma-50ma of current.
In the case of some older radios you might interface, you might need to buffer with a transistor (2n2222 / 3904/3906)
AND/OR a relay actuated by the buffer transistor. Mainly the PTT lines.
The best design is with optically-coupled transistors to prevent voltages and/or rf from running back through this port.
The unused output pins can be applied to switch things at the site. i.e. fan/light/alarm or even switching off other equipment.
It is not advisable to work a relay coil directly with a PP pin.
It is a coil and susceptible to absorbing RF and there is no quicker way to lock a computer up than to bugger this input/output with a stray signal.
 
Final Note: If you think you might be adding a Doug Hall RBI-1 Remote base later, Start populating pins 'above' pp3 reserving the 1st 3 pins.
 


Check command tables for info, not related to simple_usb.conf.
[[Category:Node Configuration]]
[[Category:Node Configuration]]

Latest revision as of 23:33, 29 June 2024

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

chan_simpleusb is ideal for smaller computers and those systems that do not need the USBRadio Channel Driver.

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

simpleusb.conf

The configuration of chan_simpleusb is done with the simpleusb.conf file and is self explanatory:

; SimpleUSB configuration
;
[general]

[usb_<node#>]

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 = 0                         ; 0 = 20db attenuator inserted, 1= 20db attenuator removed
                                    ; Set to 1 for additonal gain if using a low-level receiver output

carrierfrom = usbinvert             ; no,usb,usbinvert
                                    ; 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 fob (Active low)

ctcssfrom = usbinvert               ; no,usb,usbinvert
                                    ; no - CTCSS decoding, system will be carrier squelch
                                    ; usb - CTCSS decoding using input from USB sound fob (Active high)
                                    ; usbinvert - from the inverted CTCSS line on the USB sound fob (Active low)
deemphasis = no                     ; enable de-emphasis (input from discriminator)

plfilter = yes                      ; enable PL filter

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.

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

txmixb = no                         ; Right channel output (B): no,voice
                                    ; no - Do not output anything
                                    ; voice - output voice only

txboost = 0

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

preemphasis = 0                     ; Perform standard 6db/octave pre-emphasis

; pager = no                        ; no,a,b (e.g. pager = b means "put the normal repeat audio on channel A, and the pager audio on channel B")

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_simpleusb 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 simpleusb.conf:

[usb_<node#1>]  ( ie [usb_1234] )
pp6=ptt
pp15=ctcss  (valid ctcss signal from ext hardware 0/5v)
pp11=cor
carrierfrom=ppinvert (could also be ctcss or ctcssinvert or pp)
...(+ additional info for this nodes usb config)...

[usb_<node#2>]
pp7=ptt
pp12=cor
pp14=ctcss
carrierfrom=ctcss

...(+ additional info for this nodes usb config)...

Node Number Configuration

When configuring your simpleusb radio node you MUST ensure that the name of the radio is the same in both rpt.conf and simpleusb.conf. The system looks inside the file SimpleUSB.conf for the match of the node# to be configured (i.e. usb_1234).

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 simpleusb.conf file defines your usb radio as [usb_1000]. Your rpt.conf file would then have:

rxchannel = SimpleUSB/usb_1000

If you are reusing the simpleusb.conf file from an older installation (i.e., ACID), take special note of the change in naming. When a exact match is not made, the settings that follow will not be loaded.

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 = 5               ; 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 5.

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_simpleusb 30 buffers that are 4096 bytes in length.

The queuesize should always be greater than 1.

Miscellaneous

Parallel Port Addressing:

A line is required in your node stanza in RPT.conf to access the parallel port in the software.

iobase=0x378  ; Parallel port address

Settings are 0x378 = LPT1, 0x278 = LPT2, 0x3bc = LPT3

You can have more than one, but you need to place them in other node stanza's addressed separately. Note: Some older systems plug and play can have issues addressing these. If so, go to bios setup and address them manually. This will prevent the system from changing the address.

Parallel Port Pin Numbers

Additional note on parallel port pin numbers:

When you are looking at the pp# addressing, the actual hardware pin numbers are in computer natural logical format.
So hardware pin D0 on the LPT port is equal to pp1 in the software configuration.

"0" is the first number to a computer as seen at the BIOS and/or hardware addressing.
Be sure you are testing/setting/attaching the correct pin number.

Here is a listing of hardware pins and the software setup equivalents:

Hardware pin Software equivalent
D0 pp1
D1 pp2
D2 pp3
D3 pp4
D4 pp5
D5 pp6
D6 pp7
D7 pp8

Allstar denoted pins pp9 through pp12 are 'Input pins' listed as 'A#' in the parallel port scheme.

Special note: All these pins require 'buffering' by adding a transistor to do the actual switching. They will not sink much current on their own. While these port pins vary, most will only sink about 20ma-50ma of current. In the case of some older radios you might interface, you might need to buffer with a transistor (2n2222 / 3904/3906) AND/OR a relay actuated by the buffer transistor. Mainly the PTT lines.

The best design is with optically-coupled transistors to prevent voltages and/or rf from running back through this port. The unused output pins can be applied to switch things at the site. i.e. fan/light/alarm or even switching off other equipment. It is not advisable to work a relay coil directly with a PP pin. It is a coil and susceptible to absorbing RF and there is no quicker way to lock a computer up than to bugger this input/output with a stray signal.

Final Note: If you think you might be adding a Doug Hall RBI-1 Remote base later, Start populating pins 'above' pp3 reserving the 1st 3 pins.


Check command tables for info, not related to simple_usb.conf.