# Re: Error in OP25 Decoder block

**URL:** <https://www.ruby-forum.com/t/re-error-in-op25-decoder-block/231059>\
**Category:** GNU Radio\
**Created:** [July 18, 2014, 6:55pm UTC](https://www.ruby-forum.com/t/re-error-in-op25-decoder-block/231059 "2014-07-18T18:55:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [July 18, 2014, 6:55pm UTC](https://www.ruby-forum.com/t/re-error-in-op25-decoder-block/231059/1 "2014-07-18T18:55:51Z")

</div>

> 

> > > > import op25
> 
> I got the prompt right back, no error message.

Right - pretty much as expected. This strongly suggests that the python  
code you’re attempting to use (in this case, from gr-baz) has not yet  
been forward-ported so as to be compatible with the new GR version 3.7.x  
API’s (and with the new op25 version which has been converted to be  
compatible with the same). The amount of effort to make it compatible is  
a total unknown at this point (assuming the tiny patch to the import  
statements isn’t sufficient, that is); Balint would know for certain…

Anyway, to summarize, the test that you ran (above) indicates that the  
GR-3.7.x-compatible version of op25 is in fact installed (just not in  
the way that gr-baz is looking for it)…

Max

---

<div class="post-metadata">

**Author:** ![ikjtel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/bc8723/32.png) [@ikjtel](https://www.ruby-forum.com/u/ikjtel)\
**Post date:** [July 18, 2014, 7:53pm UTC](https://www.ruby-forum.com/t/re-error-in-op25-decoder-block/231059/2 "2014-07-18T19:53:22Z")

</div>

I probably overdid the stuff below, but I did try your other suggestion.

I made your change in -  
Home/usr/local/lib/python2.7/dist-packages/baz/op25.py

I kept the original stuff in the copyright comments. The lines in your  
suggestion above the  
\_verbose = True line were not in my op25.py.

I noticed in the GRC Welcome statement that this is Version 3.7.5 - I  
presume it is the same  
as in the 3.7.4 release notice that came out this week.

* * *

# the Free Software Foundation, Inc., 51 Franklin Street,

# Boston, MA 02110-1301, USA.

# 

# import math

# from gnuradio import gr, gru, op25 as \_op25

\_verbose = True

import math  
from gnuradio import gr, gru  
import op25 as \_op25

try:  
from gnuradio import fsk4 # LEGACY

* * *

Here are the results:

\<\<\< Welcome to GNU Radio Companion 3.7.5git-0-g2bb2b314 \>\>\>

Preferences file: /home/doug/.grc  
Block paths:  
/home/doug/usr/local/share/gnuradio/grc/blocks  
/home/doug/.grc\_gnuradio

XML parser: Found 1 erroneous XML file while loading the block tree (see  
“Help/Parser errors” for details)

Loading: “/home/doug/Documents/Op25 project files/Doug-op25.grc”

> > > Done

Showing: “/home/doug/Documents/Op25 project files/Doug-op25.grc”

Generating: “/home/doug/Documents/Op25 project files/top\_block.py”

Executing: “/home/doug/Documents/Op25 project files/top\_block.py”

linux; GNU C++ version 4.8.2; Boost\_105400; UHD\_003.007.001-84-gd99ce4ef

Using Volk machine: sse4\_a\_64  
RTL2832 Source block configuration:  
Read length (bytes): 262144  
Buffer enabled: yes  
Buffer multiplier: 8  
Buffer size (samples): 1048576  
Samples per read: 131072  
Buffer level: 50.0%  
Kernel driver detached.  
Successfully initialised demod: “ezcap EzTV”  
Probing “e4k”…not found.  
Probing “fc0013”…not found.  
Probing “fc2580”…bad check value.  
Probing “r820t”…found.  
Found RTL2832 device: ezcap EzTV (tuner: Rafael Micro R820T)  
Sample rate range: 900001 - 3200000 Hz  
Crystal frequency: 28800000 Hz  
[r820t] Initialised (default bandwidth: 0 Hz)  
Wait delay: 196.608 ms  
Traceback (most recent call last):  
File “/home/doug/Documents/Op25 project files/top\_block.py”, line  
185, in   
tb = top\_block()  
File “/home/doug/Documents/Op25 project files/top\_block.py”, line  
113, in **init**  
self.op25\_decoder\_simple\_0 = op25.op25\_decoder\_simple(key=“”,)  
File “/home/doug/usr/local/lib/python2.7/dist-packages/baz/op25.py”,  
line 98, in **init**  
raise Exception(“Could not find a decoder to use”)  
Exception: Could not find a decoder to use  
Kernel driver reattached.

> > > Done

* * *

Back in early June, near when I started this project, I emailed Balint  
from his [Spench.net](http://Spench.net) site.  
I knew he was having too much fun working on ISEE3, but on July 4, he  
sent me the following note:

```
Hi Doug,
Thanks for your email. Glad to hear you're getting into SDR! Lots of
interesting signals to discover...

That wiki page was actually contributed by someone else, and (as
you've seen) things have changed in OP25 since his instructions were
compiled. I'm not sure what happened to the OP25 build script, but I
put it back. I would suggest that you follow the instructions on the
official OP25 site now though as the build process is different 

```

AFAIK.

```
  I think you're on the op25-dev mailing list now, so hopefully
you'll be able to get some more answers there. All I can suggest
from here is that as long as you have GNU Radio installed, you
should just be able to either install the OP25 source yourself from
the git repository (and manually satisfy its dependencies) and
build/install, or use the PyBOMBs script to do it all. PyBOMBs will
also install GNU Radio, so if you already have it installed, make
sure you tell PyBOMBs that GNU Radio is already installed (IIRC when
you run it the first time you can tell it what dependencies are
already manually satisfied).

Best place to ask is the list though because I haven't played around
with it in a while
Good luck.
Kind regards,
Balint

```

I don’t really understand his Pybombs comments, but apparently, he has  
moved on.

I presume that all of my grief is because I started out with 3.7  
GNURadio , and that a realistic  
way to get op25 working is to back off to 3.6. I really don’t want to  
do that if there is any other way.

You may have read one of my previous posts on op25-dev where I described  
why I am really anxious  
to be able to listen to the new Lubbock Harris op25 phase 2 system. I  
have talked to two different Lubbock Police officers who have seriously  
complained that the audio on their new radios is so bad that they are  
unwilling to risk using them. I have a new Uniden BCD 436HP, and the  
audio on it is pretty bad.

Thanks very much for your help, Max. Lemmee know if you can think of a  
good way out of this.

Doug H.  
Lubbock
