Date   

Re: USB Audio on Raspberry Pi

Mike AE4ML
 

Apostolos,
Progress,
I replaced "hw:1,0" with "plughw:1,0"
This is the new output
pi@raspberrypi:~ $ ./USRPAudio.py
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4996:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM bluealsa
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4996:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM bluealsa
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Start audio thread


Re: USB Audio on Raspberry Pi

Apostolos Kefalas <sv1ljj@...>
 

Hello Mike,

I think the "rate" should be 44100 and not 44000

If that doesn't work,

replace "hw:1,0" with "plughw:1,0" and try again.


73
Apostolos - SV1LJJ

On Thu, 2019-03-07 at 16:08 -0800, Mike AE4ML wrote:
in the process of trouble shooting I have installed this and it
didn't help

sudo apt-get install python-pyaudio python3-pyaudio sox
pip install pyaudio


root@raspberrypi:~# cat .asoundrcfile 
pcm.!default {
  type asym
   playback.pcm {
     type plug
     slave.pcm "hw:1,0"
   }
   capture.pcm {
     type plug
     slave.pcm "hw:1,0"
   }
}
pcm.convert {
         type plug;
         slave {
               pcm default;
               rate 44000;
         }
}
--
... if you get into RF you’ll spend your days staring at test equipment
wondering why nothing works.


Re: USB Audio on Raspberry Pi

Apostolos Kefalas <sv1ljj@...>
 

Hello Mike,


IOError: [Errno -9997] Invalid sample rate
it seems to me that the usb audio device, can not work at the 8Khz
sampling rate.

Maybe try another usb audio dongle.


Apostolos




On Fri, 2019-03-08 at 13:28 -0800, Mike AE4ML wrote:
[Edited Message Follows]
I pulled out a new SD card , I haven't done anything with as far as
audio goes. 
I have the dvswitch  programs installed. 
tested aplay -l and arec -l and set the correct setting in
/etc/asound.conf
tested playing a wav file through the usb sound card
Both of these worked

aplay test.wav
and 
speaker-test -D sysdefault:CARD=1        

When I ran USRPAudio.py I go t one error and that was for pyaudio. 
So , I loaded python-pyaudio  and python3-pyaudio
now the screen is riddled with the error I reported earlier. 
--
... if you get into RF you’ll spend your days staring at test equipment
wondering why nothing works.


Re: Problem Description: No Audio @ P25 radio, No Audio DMR from Bridge P25 <<-->> DMR

Ray Harden
 

I have attached two folders to continue the diagnostic effort:

 

    -- P25_ALL.INI-Files_09MAR19: All relevant .ini files and the logs captured for MMDVM, P25Reflector, Analog_Bridge_DMR/P25, P25Gateway

 

    -- MMDVM_MSF5000_09MAR19:  MMDVM.ini, P25Gateway.ini and logs from the client P25 MSF5000 radio.

 

I hope this covers the information you requested.

 

Thanks very much for your assistance.

 

RayH   w0ray

 

From: main@DVSwitch.groups.io [mailto:main@DVSwitch.groups.io] On Behalf Of Steve N4IRS
Sent: Wednesday, March 6, 2019 2:01 PM
To: main@DVSwitch.groups.io
Subject: Re: [DVSwitch] Problem Description: No Audio @ P25 radio, No Audio DMR from Bridge P25 <<-->> DMR

 

All off

On 3/6/2019 3:00 PM, Ray Harden wrote:

Debug on or off, all or which ones?


From: main@DVSwitch.groups.io <main@DVSwitch.groups.io> on behalf of Steve N4IRS <szingman@...>
Sent: Wednesday, March 6, 2019 1:40:35 PM
To: main@DVSwitch.groups.io
Subject: Re: [DVSwitch] Problem Description: No Audio @ P25 radio, No Audio DMR from Bridge P25 <<-->> DMR

 

OK, here is what I need.
Run MMDVM_Bridge Analog_Bridge_DMR Analog_Bridge_P25 P25Gateway all at the same time. Let everything startup and settle. Give me one transmission from a user with a DMR radio. The give me one transmission with a P25 radio. Capture the output from each program in a file then zip it up and send it.

On 3/6/2019 2:32 PM, Ray Harden wrote:

Sorry for the delay … took some time to delete the unwanted lines  … both files are close in time segments … I was already in the process before I saw your  message about Debug Off

 

From: main@DVSwitch.groups.io [mailto:main@DVSwitch.groups.io] On Behalf Of Steve N4IRS
Sent: Wednesday, March 6, 2019 11:28 AM
To: main@DVSwitch.groups.io
Subject: Re: [DVSwitch] Problem Description: No Audio @ P25 radio, No Audio DMR from Bridge P25 <<-->> DMR

 

Turn off debug in each program.
Can you send actual text files?
I do see "No response from 31900, unlinking on the gateway.

 

 


Re: USB Audio on Raspberry Pi

Mike AE4ML
 
Edited

I pulled out a new SD card , I haven't done anything with as far as audio goes.
I have the dvswitch  programs installed.
tested aplay -l and arec -l and set the correct setting in /etc/asound.conf
tested playing a wav file through the usb sound card
Both of these worked

aplay test.wav
and
speaker-test -D sysdefault:CARD=1       

When I ran USRPAudio.py I go t one error and that was for pyaudio.
So , I loaded python-pyaudio  and python3-pyaudio
now the screen is riddled with the error I reported earlier.


Re: Iaxrpt/DVSwitch keypad missing

Steve N4IRS
 

Frank,
We are looking into your problem if you would like to revert to the last release version you can install it from <http://dvswitch.org/files/Mobile/DVM_144.apk> I will let you know when we have resolved your problem.

73, Steve N4IRS

On 3/8/2019 9:08 AM, Private via Groups.Io wrote:
Hello, I have been using IAXRPT/SVSwitch for over a year withhout any problems until this past week, (first wk of March) but now im experiencing no key (number pad ) when I open the program on my phone. Phone is a Samsung 7, Galaxy edge, Hardware Ver REV 0.7I have cleared the cache on phone and deleted program and deleted all files assciated with the program and reloaded but still same issue, NO Keypad when program starts, also program loads automatically to my node without any issues.
Frank KB2AYSNode 28201


Analog audio streaming

sv1hep@...
 

Hi
Thanks to the team here, I run successfully for my needs a main server HBLink with HBMonitor on line, connected to them (HotSpots)<=>(HotSpots)<=>(BM) also  (HBLink)<=>(IPSC2)<=>(NXDN)<=>( ALS)<=>(MMDVMBridge)<=>(AnalogBridge)<=>(Echolink) etc.
The next challenge i think will be the export analog audio for web streaming like BM hose.
Has anyone tries something like that ?

73' Chris SV1HEP


Link HBLink and a room Wires-X from Yeasu in C4FM #hblink

Bruno
 


--
Hello everyone,
I want to set up a Link between HBLink and a room Wires-X from Yeasu in C4FM. Is there a possibility to set up the type of editing.
73 to all.
F1PTL Bruno


Iaxrpt/DVSwitch keypad missing

Private
 

Hello, I have been using IAXRPT/SVSwitch for over a year withhout any problems until this past week, (first wk of March) but now im experiencing no key (number pad ) when I open the program on my phone. Phone is a Samsung 7, Galaxy edge, Hardware Ver REV 0.7I have cleared the cache on phone and deleted program and deleted all files assciated with the program and reloaded but still same issue, NO Keypad when program starts, also program loads automatically to my node without any issues.
Frank KB2AYSNode 28201


Keypad missing in iaxrpt

Private
 

Hello I have been using the newest ver of dvswitch and it worked fine but lately the keypad has disappeared, tried reloading program but still not there, any guidance to check would be helpful, kb2ays frank


Iaxrpt/DVSwitch keypad missing

Private
 

Hello, I have been using IAXRPT/SVSwitch for over a year withhout any problems until this past week, (first wk of March) but now im experiencing no key (number pad ) when I open the program on my phone. Phone is a Samsung 7, Galaxy edge, Hardware Ver REV 0.7I have cleared the cache on phone and deleted program and deleted all files assciated with the program and reloaded but still same issue, NO Keypad when program starts, also program loads automatically to my node without any issues.
Frank KB2AYSNode 28201


Re: Problem Description: No Audio @ P25 radio, No Audio DMR from Bridge P25 <<-->> DMR

Steve N4IRS
 

Tim,
If you mean the Android app, this is really not the place to discuss it. There is a subgroup at <https://dvswitch.groups.io/g/Mobile> To answer your question anyway, It is up to the node owner to allow a connection from a Mobile user.

Steve N4IRS

On 3/7/19 11:36 PM, Tim Porter wrote:
i got a question steve? is dvswitch only for node owners> got a node giveing me a hard time over this and am wondering who is rite? can you put a little comment on this for me thanksTim
k4kwq



Re: Problem Description: No Audio @ P25 radio, No Audio DMR from Bridge P25 <<-->> DMR

Tim Porter
 

i got a question steve? is dvswitch only for node owners> got a node giveing me a hard time over this and am wondering who is rite? can you put a little comment on this for me thanksTim
k4kwq


DMR to YSF Bridge not working right.

nick@...
 

I'm going to do my best to explain this issue....

This is the setup:
DMR TG311752 <> MMDVM_Bridge<>YSFReflector<>OpenSpot<>FTM-100 connected to Wires X Room here at my house. 
Goal is to connect BMTG to WiresX and YSFReflector

The Issue: When transmitting on DMR the audio coming out of the openspot to the FTM100 works for the first few seconds (I can hear myself) and then there is no audio and the receive light on the FTM-100 starts flashing. When I transmit on YSF to DMR it works perfectly. It's only from DMR to YSF that there is an issue. 

I have tried both an Open spot and a Pi-Star ZumSpot with the same results. I have also tried a FTM-400 with the same results
I have also connected a seperate hotspot to me YSFReflector and transmitted with YSF and that works fine. 

I have a YSFReflector up and running good. 
I have MMDVM-Bridge Up and running good. Verified the audio ports are in a good loop. 

Thoughts?


Re: USB Audio on Raspberry Pi

Mike AE4ML
 

in the process of trouble shooting I have installed this and it didn't help

sudo apt-get install python-pyaudio python3-pyaudio sox
pip install pyaudio


root@raspberrypi:~# cat .asoundrcfile
pcm.!default {
  type asym
   playback.pcm {
     type plug
     slave.pcm "hw:1,0"
   }
   capture.pcm {
     type plug
     slave.pcm "hw:1,0"
   }
}
pcm.convert {
         type plug;
         slave {
               pcm default;
               rate 44000;
         }
}


Re: USB Audio on Raspberry Pi

Steve N4IRS
 

Audio device setup?

 

Sent from Mail for Windows 10

 

From: Mike AE4ML
Sent: Thursday, March 7, 2019 10:29 AM
To: main@DVSwitch.groups.io
Subject: Re: [DVSwitch] USB Audio on Raspberry Pi

 

same results using python 2.7 or 3.5 .

I see several failures on this line. src/hostapi/alsa/pa_linux_alsa.c

 


Re: USB Audio on Raspberry Pi

Mike AE4ML
 

same results using python 2.7 or 3.5 .

I see several failures on this line. src/hostapi/alsa/pa_linux_alsa.c


USB Audio on Raspberry Pi

Mike AE4ML
 

I have tried this program USRPAudio.py on a Raspberry Pi.
I'm using a Sound Blaster USB  sound card. The audio works and sounds good  with Test files.
but when I run the USRPAudio.py it just riddled with errors. This is a fresh install of Stretch 11 18 .
Fresh install of DVSWITCH.


Re: ASL to DMR Bridge...changing talkgroups

 

I think this deserves to be on the wiki!
It sounds like this is working reliably for everyone that's tried it, is that correct?

To sum up:

This is the script:

#!/bin/bash
 
# /*
#  * Copyright (C) 2018 N4IRR
#  *
#  * Permission to use, copy, modify, and/or distribute this software for any
#  * purpose with or without fee is hereby granted, provided that the above
#  * copyright notice and this permission notice appear in all copies.
#  *
#  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
#  * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
#  * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
#  * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
#  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
#  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
#  * PERFORMANCE OF THIS SOFTWARE.
#  */
 
function tune() {
python - <<END
#!/usr/bin/env python
 
import sys
import socket
import struct
 
cmd = "txTg=$1".encode("utf-8")
_sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
cmd = struct.pack("BB", 0x05, len(cmd))[0:2] + cmd
# Set the second value below to match the rxPort in the [AMBE_AUDIO] stanza of Analog_Bridge.ini
_sock.sendto(cmd, ('127.0.0.1', 31100))
_sock.close()
 
END
}
 
tune $1

question: is that tune $1 part of the script?

create the script here: /usr/local/sbin and name it tune.sh 
make the script executable: chmod +x tune.sh  

then this email tells you how to make it available for DTMF and Allmon:
OK,
Now we have a script to change TG "on the fly" Let's make it available to DTMF and Allmon.
First we need ASL to execute the script from within. There is more then one way to do this. I'll use the internal command.
Lets assume you placed the script in /usr/local/sbin and called it tune.sh
You can run the program from the Linux command prompt with /usr/local/sbin/tune.sh 1234 to tune to TG 1234

Let's add it to rpt.conf
To run a external script the ASL command is:
4321=cmd,/usr/local/sbin/tune.sh 1234 (This ASSUMES 4321 is not in use nor is 43 or 432) 
When a user on the node sends *4321 ASL will execute the script /usr/local/sbin/tune.sh with a parameter of  1234

So far so good? Now let's add it to Allmon2
in the allmon directory is a file, controlpanel.ini in that file as a example you will find:

labels[] = "Say Time of Day (local only) the TT way"
cmds[] = "rpt fun %node% *74"
 
Lets add a command. Copy and edit above:
labels[] = "Tune DMR to Talk Group 1234"
cmds[] = "rpt fun %node% *4321"

Poof! you have added a command to Allmon2 which will tell ASL to execute the script.
Clear as mud?

73, Steve N4IRS 

Is that everything needed? 

On Thu, Mar 7, 2019 at 12:07 AM Matt <ve3oy@...> wrote:

[Edited Message Follows]

I just copied the script you posted above ...
This is my script (changeTG.sh)

#!/bin/bash
 
# /*
#  * Copyright (C) 2018 N4IRR
#  *
#  * Permission to use, copy, modify, and/or distribute this software for any
#  * purpose with or without fee is hereby granted, provided that the above
#  * copyright notice and this permission notice appear in all copies.
#  *
#  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
#  * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
#  * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
#  * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
#  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
#  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
#  * PERFORMANCE OF THIS SOFTWARE.
#  */
 
function tune() {
python - <<END
#!/usr/bin/env python
 
import sys
import socket
import struct
 
cmd = "txTg=$1"
_sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
cmd = struct.pack("BB", 0x05, len(cmd))[0:2] + cmd
# Set the second value below to match the rxPort in the [AMBE_AUDIO] stanza of Analog_Bridge.ini
_sock.sendto(cmd, ('127.0.0.1', 31100))
_sock.close()
 
END
}
 
tune $1


====
After doing some more research (about Python) it would seem that this is a known problem.
[SNIP]
Python3 has several different 'string' types.
You are trying to combine a bytes string (basically an immutable character array) to a unicode string. 
[/SNIP]

I may have fixed the script by changing this one line:
cmd = "txTg=$1".encode("utf-8")

So far, it has not returned an error.
I can't test further until later tonight, but I am hoping this has fixed it.
I'll update later with any results.

====
A little more information ...
I am running "Asterisk 1.4.23-pre.hamvoip-V1.5.3-27-app_rpt-0.327-04/04/2018" which comes with Python 3.5.1

After reading more on this problem, it has been reported that the issue did not appear in Python 2.
I cannot confirm or deny the claim, but if anyone runs into this error - try the fix I've included above.

73 de Matt
VE3OY



Re: Problem Description: No Audio @ P25 radio, No Audio DMR from Bridge P25 <<-->> DMR

Ray Harden
 

Cannot restart test due to P25Reflector gives message on startup:

 

  /cd /usr/local/bin

  ./P25Reflector.sh start /etc/P25Reflector.ini &

         GIVES MSG:  ./P25Reflector.sh   Line 20  1145 segmentation fault:  ./prog  $prog.args

 

I don’t know how to fix this.

 

RayH  w0ray

 

From: main@DVSwitch.groups.io [mailto:main@DVSwitch.groups.io] On Behalf Of Steve N4IRS
Sent: Wednesday, March 6, 2019 1:41 PM
To: main@DVSwitch.groups.io
Subject: Re: [DVSwitch] Problem Description: No Audio @ P25 radio, No Audio DMR from Bridge P25 <<-->> DMR

 

OK, here is what I need.
Run MMDVM_Bridge Analog_Bridge_DMR Analog_Bridge_P25 P25Gateway all at the same time. Let everything startup and settle. Give me one transmission from a user with a DMR radio. The give me one transmission with a P25 radio. Capture the output from each program in a file then zip it up and send it.

On 3/6/2019 2:32 PM, Ray Harden wrote:

Sorry for the delay … took some time to delete the unwanted lines  … both files are close in time segments … I was already in the process before I saw your  message about Debug Off

 

From: main@DVSwitch.groups.io [mailto:main@DVSwitch.groups.io] On Behalf Of Steve N4IRS
Sent: Wednesday, March 6, 2019 11:28 AM
To: main@DVSwitch.groups.io
Subject: Re: [DVSwitch] Problem Description: No Audio @ P25 radio, No Audio DMR from Bridge P25 <<-->> DMR

 

Turn off debug in each program.
Can you send actual text files?
I do see "No response from 31900, unlinking on the gateway.

 

6461 - 6480 of 9925