 
            I have an older system working fine on the master branch and I'm currently trying to set up a new VM running the max branch. The goal is to send audio from two talkgroups to darkice. The problem is that I'm not getting any audio out of rx.py.
I know the darkice config works, because I can do this and hear pink noise on the stream:
speaker-test -r 8000 -D hw:Loopback,0,0
But starting rx.py with the same audio device like this, I never hear anything:
./rx.py --args rtl=0 -N LNA:42 -f 774081250 -S 1320000 -v 5 -2 -T ss911_tacoma.tsv -O hw:Loopback,0,0
The receiver seems to be working. I can see the name of the talkgroup I'm interested in at the bottom of the screen while it's active, I just don't hear anything on the stream:
""" NAC 0x1e1 WACN 0xbee00 SYSID 0x1e7 774.431250/804.431250 tsbks 2390 voice frequency 773.431250 tgid(s) 40306 40107 0.3s ago count 77 voice frequency 774.681250 tgid(s) 59197 40106 0.3s ago count 166
Frequency 774.431250 Talkgroup ID 40106 PCSO East """
Is there something obvious I'm doing wrong here?
P.S. Is there a better way to pipe audio to darkice than snd-aloop?
Tom
 
            More command line options are needed: -O Loopback:0,0 -V -2 -U
Make sure you see an entry in the log file that says "audio device: Loopback:0,0" or whatever alsa device you are using.
In reality you're probably better off making sure op25 plays audio through the default device before you worry about getting it going through the loopback.
As a secondary recommendation, the alsa buffering is considerably better in the version of sockaudio.py found in my github repo. I suggest you upgrade to that version as it has other fixes too.
Graham
 
            On Tue, Oct 17, 2017 at 2:34 PM, gnorbury@bondcar.com [op25-dev] op25-dev@yahoogroups.com wrote:
More command line options are needed: -O Loopback:0,0 -V -2 -U
Thanks, I must have missed that detail with the conversion to rx.py. I already have -2, but not -V and -U.
This fixed it. I'm getting audio through the loopback now!
Make sure you see an entry in the log file that says "audio device: Loopback:0,0" or whatever alsa device you are using.
I don't see this line in the output. I also haven't specified a log file. Is there a default log path? Is this something I should expect to see in stdout or stderr?
In reality you're probably better off making sure op25 plays audio through the default device before you worry about getting it going through the loopback.
I tried that, but virt-manager isn't even passing the speaker test audio, so I think that's a lost cause. There is no physical sound output on this system.
As a secondary recommendation, the alsa buffering is considerably better in the version of sockaudio.py found in my github repo. I suggest you upgrade to that version as it has other fixes too.
It's unclear to me what sockaudio.py does and how I would use it with darkice. Is there an example of this somewhere?
I tried your repo, but got an error, so I went back to max:
tom@stream:~/op25/op25/gr-op25_repeater/apps$ git status HEAD detached at boatbod/master Untracked files: (use "git add <file>..." to include in what will be committed)
../../../build/ ss911_tacoma.tsv ss911_tgs.tsv
nothing added to commit but untracked files present (use "git add" to track) tom@stream:~/op25/op25/gr-op25_repeater/apps$ ./rx.py --args rtl=0 -N LNA:42 -f 774081250 -S 1320000 -v 5 -2 -T ss911_tacoma.tsv linux; GNU C++ version 4.8.2; Boost_105400; UHD_003.005.005-0-unknown
gr-osmosdr 0.1.1 (0.1.1) gnuradio 3.7.2.1 built-in source types: file osmosdr fcd rtl rtl_tcp uhd hackrf bladerf rfspace Using device #0 Realtek RTL2838UHIDIR SN: 00000001 Found Rafael Micro R820T tuner gain: name: LNA range: start 0 stop 0 step 0 setting gain LNA to 42 supported sample rates 250000-2560000 step 24000 Exact sample rate is: 1320000.047207 Hz set_center_freq: 774081250 Using Volk machine: sse4_2_64_orc Traceback (most recent call last): File "./rx.py", line 671, in <module> tb = p25_rx_block() File "./rx.py", line 220, in __init__ self.open_usrp() File "./rx.py", line 606, in open_usrp self.__set_rx_from_osmosdr() File "./rx.py", line 542, in __set_rx_from_osmosdr self.__build_graph(self.src, capture_rate) File "./rx.py", line 283, in __build_graph symbol_rate = self.symbol_rate) File "/home/tom/op25/op25/gr-op25_repeater/apps/p25_demodulator.py", line 173, in __init__ self.lpf = filter.fft_filter_ccf(decimation, lpf_coeffs) AttributeError: 'module' object has no attribute 'fft_filter_ccf'
Tom
 
            If you have audio I guess it's working so there's no need to worry about the audio device line in the log file :) The log is generally produced by redirecting stderr to something. Typically "stderr.2" if you follow the example in the README. You can "tail -f stderr.2" to see a real-time output of log messages if there are any.
I'm not sure what went wrong with my repo, but you can access it pretty easily as follows:
cd ~ git clone https://github.com/boatbod/op25 https://github.com/boatbod/op25 op25.boatbod cd op25.boatbod mkdir build cd build cmake ../ make sudo make install
I suspect the problem might have been that you tried to clone my repo into the existing max branch, which comes from a different source and branch. Best to delete and start over, or clone into a different subdir as shown above.
Graham
 
            Addendum: the filter error is something I saw once before. For some unknown reason your version of gnuradio does not have the fft_filter_ccf() routine, so you are forced to use fir_filter_ccf() instead. Max's code uses the FIR version by default, but I'd changed mine to use FFT because it was much more cpu-efficient for the lightweight hardware such as Rasp PI 3.
You can edit the p25_demodulator.py file, line 173 and change 'fft' to 'fir' and it should work on your system.
 
            On Tue, Oct 17, 2017 at 7:45 PM, gnorbury@bondcar.com [op25-dev] < op25-dev@yahoogroups.com> wrote:
Addendum: the filter error is something I saw once before. For some unknown reason your version of gnuradio does not have the fft_filter_ccf() routine, so you are forced to use fir_filter_ccf() instead. Max's code uses the FIR version by default, but I'd changed mine to use FFT because it was much more cpu-efficient for the lightweight hardware such as Rasp PI 3.
You can edit the p25_demodulator.py file, line 173 and change 'fft' to 'fir' and it should work on your system.
Lower CPU usage sounds nice. I'd like to take advantage of it. My installation has the Ubuntu 14.04 gnuradio package (having followed these instructions: http://op25.osmocom.org/trac/wiki.=/wiki/InstallInstructionsPage#InstallInst...). Is there a different distribution or gnuradio package you recommend to get fft_filter_ccf()?
Tom
 
            I just pushed a fix for the fft_filter_ccf() / fir_filter_ccf() error that a couple of people have experienced. Fundamentally I don't know why some gnuradio installations have both while others only have one, but the p25_demodulator code now falls back to fir if fft is not present.
Anyone who wants the update will need to "git pull" to download the change.

