[arm-allstar] simultaneous asterisk and direwolf possible?
Tony
node4139x at gmail.com
Mon Apr 6 00:38:44 EDT 2020
Agreed that nptee works well. I installed "pv" (pipe viewer; pv
/tmp/outsound/dw) and can easily see that the named pipe is delivering
undecoded when both supermon and the radio audio indicate node Tx is
happening.
My direwolf invocation issue seems to be that I only require APRS Rx
decode, but my direwolf.conf/command-line usage demands a Tx parameter
that I don't yet understand how to configure as /dev/null and not the
"aplay -l" default device:
[root at yellow ~]# lame -r -m m -s 44.1 /tmp/outsound/dw - 2>/dev/null |
direwolf -t 0 -
Dire Wolf version 1.5
...
Reading config file direwolf.conf
Audio input device for receive: stdin (channel 0)
Audio out device for transmit: default (channel 0)
ALSA lib pcm_dmix.c:1029:(snd_pcm_dmix_open) unable to open slave
Could not open audio device default for output
Device or resource busy
Pointless to continue without audio device.
I'll study the direwolf docs carefully before asking assistance in the
groups.io ... they seem very willing to help those that do their own
homework.
On 4/5/20 8:44 PM, "Doug Crompton via ARM-allstar" wrote:
> I really think the nptee solution would be better. It writes to a file and
> direwolf would be setup to read its data from that file. nptee was
> originally written for broadcastify users to unlink it from the code
> eliminating crashes when one or the other was stopped and also allowing up
> to 10 streams to take place simultaneously. So theoretically you could have
> multiple things using the audio like broadcastify and direwolf..There are a
> lot of possibilities here!
>
> *73 Doug, WA3DSP*
> *http://wa3dsp.org <http://wa3dsp.org>*
>
>
> On Sun, Apr 5, 2020 at 8:59 PM "Tony via ARM-allstar" <
> arm-allstar at hamvoip.org> wrote:
>
>> Thanks Doug, the named pipe for direwolf usage was successfully created
>> by placing "outstreamcmd=/usr/local/bin/nptee,dw" at the top of the
>> main-node stanza in /etc/asterisk/rpt.conf and restarting asterisk:
>>
>> [root at yellow ~]# ls -l /tmp/outsound/dw
>> prw-r--r-- 1 root root 0 Apr 5 16:38 /tmp/outsound/dw
>>
>> I guess I'll have to study carefully both the lame and direwolf
>> invocations to see what the next problems are:
>>
>> [root at yellow ~]# lame --preset cbr 16 -r -m m -s 8 --bitwidth 16
>> /tmp/outsound/dw - 2>/tmp/status | direwolf -t 0 -
>> Dire Wolf version 1.5
>> ...
>> Reading config file direwolf.conf
>> Audio input device for receive: stdin (channel 0)
>> Audio out device for transmit: default (channel 0)
>> ALSA lib pcm_dmix.c:1029:(snd_pcm_dmix_open) unable to open slave
>> Could not open audio device default for output
>> Device or resource busy
>> Pointless to continue without audio device.
>>
>>
>> On 4/5/20 3:35 PM, "Doug Crompton via ARM-allstar" wrote:
>>> A couple of thoughts....
>>>
>>> You could archive the audio and play it back to direwolf.... Don't
>> archive
>>> to the SD card. Use a USB stick or do it to RAM,
>>>
>>> archivedir=/media/MS1
>>> archiveaudio=1 ; Saving .wav files
>>>
>>> You could use nptee to stream the audio to the other device....
>>>
>>> https://www2.hamvoip.org/nptee_howto.pdf
>>>
>>> *73 Doug, WA3DSP*
>>> *http://wa3dsp.org <http://wa3dsp.org>*
>>>
>>>
>>> On Sun, Apr 5, 2020 at 6:25 PM "Tony via ARM-allstar" <
>>> arm-allstar at hamvoip.org> wrote:
>>>
>>>> My hamvoip node is often connected to an ASL hub node on a large network
>>>> of linked repeaters. Occasionally, we all hear what sound like APRS
>>>> beacons, as they occur regularly every 10 or 15 minutes. The idea occurs
>>>> to me to use "direwolf" to decode these beacons, so that the responsible
>>>> operator can be alerted to their error of beaconing on a linked network
>>>> of FM repeaters.
>>>>
>>>> The initial problem occurs as an inability to share the USB sound card
>>>> audio:
>>>>
>>>> [root at yellow ~]# aplay -l
>>>> **** List of PLAYBACK Hardware Devices ****
>>>> card 0: Device [USB Audio Device], device 0: USB Audio [USB Audio]
>>>> Subdevices: 0/1
>>>> Subdevice #0: subdevice #0
>>>>
>>>> [root at yellow ~]# grep -E "^ADEVICE|^ACHANNELS" direwolf.conf
>>>> ADEVICE plughw:0,0 -
>>>> ACHANNELS 1
>>>>
>>>> [root at yellow ~]# direwolf -t 0
>>>> Dire Wolf version 1.5
>>>> ...
>>>> Reading config file direwolf.conf
>>>> Audio device for both receive and transmit: plughw:0,0 (channel 0)
>>>> Could not open audio device plughw:0,0 for input
>>>> Device or resource busy
>>>> Pointless to continue without audio device.
>>>>
>>>> This occurs even if /run/lock/asound.state.lock and its symlink
>>>> /var/lock/asound.state.lock are rm'd. It runs properly if asterisk isn't
>>>> running, but then the ASL audio stream containing the APRS isn't
>> available:
>>>> [root at yellow ~]# astdn.sh && direwolf -t 0
>>>> Stopping Asterisk...
>>>> Asterisk ended with exit status 0
>>>> Asterisk shutdown normally.
>>>> Dire Wolf version 1.5
>>>> ...
>>>> Reading config file direwolf.conf
>>>> Audio device for both receive and transmit: plughw:0,0 (channel 0)
>>>> Channel 0: 1200 baud, AFSK 1200 & 2200 Hz, E+, 44100 sample rate / 3,
>>>> DTMF decoder enabled.
>>>> Ready to accept AGW client application 0 on port 8000 ...
>>>> Ready to accept KISS TCP client application 0 on port 8001 ...
>>>>
>>>> Is there some way to get both asterisk and direwolf listening to the
>>>> same audio stream? Or must I use a USB RTL-SDR stream listening on the
>>>> simplex node radio frequency and decode the APRS from among that audio
>>>> stream?
>>>> _______________________________________________
>>>>
>>>> ARM-allstar mailing list
>>>> ARM-allstar at hamvoip.org
>>>> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>>>>
>>>> Visit the BBB and RPi2/3/4 web page - http://hamvoip.org
>>> _______________________________________________
>>>
>>> ARM-allstar mailing list
>>> ARM-allstar at hamvoip.org
>>> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>>>
>>> Visit the BBB and RPi2/3/4 web page - http://hamvoip.org
>> _______________________________________________
>>
>> ARM-allstar mailing list
>> ARM-allstar at hamvoip.org
>> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>>
>> Visit the BBB and RPi2/3/4 web page - http://hamvoip.org
> _______________________________________________
>
> ARM-allstar mailing list
> ARM-allstar at hamvoip.org
> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>
> Visit the BBB and RPi2/3/4 web page - http://hamvoip.org
More information about the ARM-allstar
mailing list