I recently set up a node with the ASL 2.0 image for RPi (on a Pi 4B) and it was working very well with simpleusb. The node is full-duplex (ie. duplex=3, not a repeater), using an HT that does cross-band full-duplex for the node radio. I was surprised at how smoothly the setup went, I only had to change a few settings in rpt.conf and everything then worked great.
Because I’m using an HT there is no COS line output, so I had built a circuit using a few op amps to detect any signal > ~1mV on the Rx audio line and assert COS in that case. This circuit works very well, but I’m hoping that usbradio’s carrierfrom = dsp
option will be able to do the same thing and thus a hardware COS detection circuit should not be necessary at all, which would be great, as there are probably many people who have an old HT lying around that could be used for a node radio with no extra circuitry needed. (However this may not be a realistic expectation because in developing my COS detect circuit I found that the detection thresholds, peak detection and averaging need to be done a certain way or the COS will not trigger at a low enough level or might trigger when it shouldn’t eg. from RFI on a cable. BTW if anyone knows of any documentation on what exactly USBRadio should be capable of in these regards please let me know.)
The usbradio.conf settings seem pretty well documented and clear, but after setting it up and enabling in rpt.conf, ie. with the following,
; rxchannel = SimpleUSB/usb_571570 ; SimpleUSB
rxchannel = Radio/usb_571570 ; USBRadio (DSP)
And then restarting the Pi, I am seeing various errors. First asterisk would not start at all, and gave some errors which I did not make a copy of. Then it started running OK a couple attempts later. Doing a ‘sudo service asterisk status’ lists the following warnings and errors:
● asl-asterisk.service - AllStar Asterisk
Loaded: loaded (/lib/systemd/system/asl-asterisk.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2022-11-01 20:48:36 UTC; 32min ago
Docs: man:asterisk(8)
Process: 509 ExecStartPre=/usr/bin/mkdir -p /run/asterisk (code=exited, status=0/SUCCESS)
Main PID: 520 (asterisk)
Tasks: 25 (limit: 4323)
CGroup: /system.slice/asl-asterisk.service
└─520 /usr/sbin/asterisk -g -f
Nov 01 20:48:38 node571570 asterisk[520]: [Nov 1 20:48:38] WARNING[577]: chan_usbradio.c:2738 usbradio_read: Possibly stuck USB read channel. [usb_571570]
Nov 01 20:48:38 node571570 asterisk[520]: [Nov 1 20:48:38] WARNING[577]: chan_usbradio.c:2741 usbradio_read: Nope, USB read channel [usb_571570] wasn't stuck after all.
Nov 01 21:00:07 node571570 asterisk[520]: [Nov 1 21:00:07] ERROR[577]: chan_usbradio.c:2661 usbradio_read: HID process has died or something!!
Nov 01 21:00:08 node571570 asterisk[520]: [Nov 1 21:00:08] WARNING[552]: app_rpt.c:22603 rpt_master: rpt_thread restarted on node 571570
Nov 01 21:00:08 node571570 asterisk[520]: ERROR: numrxcodes != numtxcodes
Nov 01 21:00:08 node571570 asterisk[520]: [Nov 1 21:00:08] WARNING[615]: chan_usbradio.c:1762 hidthread: Loaded parameters from usbradio_tune_usb_571570.conf for device usb_571570 .
Nov 01 21:00:08 node571570 asterisk[520]: [Nov 1 21:00:08] WARNING[614]: chan_usbradio.c:2738 usbradio_read: Possibly stuck USB read channel. [usb_571570]
Nov 01 21:00:08 node571570 asterisk[520]: [Nov 1 21:00:08] WARNING[614]: chan_usbradio.c:2741 usbradio_read: Nope, USB read channel [usb_571570] wasn't stuck after all.
Strangely, the PTT line seemed to be stuck on for awhile, but then after a couple reboots that issue went away and it now occasionally will do a transmit, but it does not seem to register anything I transmit to the node.
Here is the usbradio.conf file:
; If you are going to use this channel driver, you MUST enable it in modules.conf
; noload => chan_usbradio.so ; CM1xx USB Cards with Radio Interface Channel Driver (DSP)
; to:
; load => chan_usbradio.so ; CM1xx USB Cards with Radio Interface Channel Driver (DSP)
; Usbradio channel driver Configuration File
[general]
[usb_571570]
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 additonal 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
rxsqhyst = 3000 ; Setting Squelch Hysteresis. 3000 is the default; 500 seems good.
; Then set the squelch to the highest number revealed when doing a "radio
; tune rxsquelch" - running the command multiple (like 20) times in a row.
; <http://allstarnode.com/wiki/lib/exe/fetch.php?media=asterisk-notes-wj8g.pdf>
txctcssdefault = 100.0 ; default TX CTCSS frequency, any frequency permitted
rxctcssfreqs = 100.0,91.5 ; RX CTCSS frequencies list in floating point. must be in table
txctcssfreqs = 100.0,91.5 ; TX CTCSS frequencies list. any frequency OK. will follow RX CTCSS frequency
rxctcssoverride = 1 ; Set to 1 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 fob (Active low)
; dsp - from RX noise using DSP techniques
; vox - voice activated from RX audio
ctcssfrom = no ; no,usb,usbinvert,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 = speaker ; input type from radio: no,speaker,flat
; no - RX audio input not used
; flat - Use RX audio from discriminator (before de-emphasis) (default)
; speaker - use de-emphasized audio
rxsquelchdelay = 20 ; 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.
txboost = 0 ; Add transmitter audio gain boost: 0,1
txprelim = no ; 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 = voice ; 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
; (same opts as for txmixa)
; Audio filters - requires version newer than ASL_1.01
rxlpf = 2 ; 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 = 1 ; Receiver Audio High Pass Filter 0,1
; 0 - 300 Hz cutoff. (Default) Reduce subaudible signals in ReTx and in the Rx 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 = 1 ; 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 = 1 ; Transmitter Audio High Pass Filter 0,1,2
; 0 - 300 Hz cutoff. (Default) Reduces interference between voice & sub-audible signaling.
; 1 - 250 Hz cutoff for increased bass response in transmitted audio.
; 2 - 120 Hz cutoff for special apps requiring additional bass response in Tx audio.
; Not recommended due to possibility of voice energy interfering w/sub-audible signaling
invertptt = 0 ; Invert PTT: 0,1
; 0 - ground to transmit
; 1 - open to transmit
duplex = 1 ; Duplex 0,1
; 0 - half duplex
; 1 - full duplex
duplex3 = 0 ; duplex 3 gain setting (0 to disable) ???
#includeifexists custom/usbradio.conf
If I run asterisk -vvvr I see some occasional messages, and it seems to be running normally but I’m not familiar with what all the options are or what the best way is to dump the current status / errors. One thing I did try is rpt showvars 571570,
Variable listing for node 571570:
RPT_TXKEYED=0
RPT_ETXKEYED=1
RPT_RXKEYED=1
RPT_LINKS=0>
RPT_NUMLINKS=0
RPT_AUTOPATCHUP=0
-- 6 variables
Thus it seems to think RX is keyed? But there is definitely not any RX audio coming in. My HT is using squelch in addition to CTCSS Tone Squelch enabled. Thus why I do not have any tones enabled in the usbradio.conf file.
Another odd thing is every ~5 minutes I get a short ~1 Sec transmit from the node with no audio, and the following messages in the console:
-- Hungup 'DAHDI/pseudo-1607945115'
-- Hungup 'DAHDI/pseudo-868058813'
Any help with debugging the above and hopefully getting usbradio to work would be greatly appreciated. Thanks, David