# OOT block not showing in GRC

**URL:** <https://www.ruby-forum.com/t/oot-block-not-showing-in-grc/242943>\
**Category:** GNU Radio\
**Created:** [August 9, 2015, 12:34am UTC](https://www.ruby-forum.com/t/oot-block-not-showing-in-grc/242943 "2015-08-09T00:34:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rafa\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/958977/32.png) [@Rafa\_F](https://www.ruby-forum.com/u/Rafa_F)\
**Post date:** [August 9, 2015, 12:34am UTC](https://www.ruby-forum.com/t/oot-block-not-showing-in-grc/242943/1 "2015-08-09T00:34:50Z")

</div>

Hello all,

I am trying to create a simple OOT block. Eventually I would like to  
create  
a block that lets a transmitting agent know if their message was  
received  
or not, but for now I am just trying to create a block that multiplies  
the  
input values by 2 (very similar to the guided tutorial example of the  
square\_ff block).

So the problem is that when I follow all of the instructions no errors  
appear but when I open up the GRC, my module and blocks are not there.

So hopefully no one minds if I explain how I have installed Gnuradio on  
my  
machine and the process of creating the OOT module, in hopes someone  
might  
find where I made an error.

I have already gotten previous help and responses on here that really  
did  
help me out so I’d like to say again, thank you to the community.

Ok, so I used Pybombs to install Gnuradio.

/home/username/Thesis/pybombs is where I installed pybombs.

Before installing gnuradio I changed the permissions to the path of  
/opt/gnuradio/pybombs by using: sudo chown username:mygroupname  
/opt/gnuradio/pybombs (thanks to Nathan W.)

I then used ./pybombs install gnuradio.

I changed the install prefix to /opt/gnuradio/pybombs

Then I used ./pybobms env  
source /opt/gnuradio/pybombs/setup\_env.sh (sometimes I have to rerun  
this  
to get the GRC to open, not sure what I’m doing to undo this command)

Then I created the folder, /home/username/Thesis/OOT

I then used gr\_modtool newmod ACK

Then /home/username/Thesis/OOT/gr-ACK gr\_modtool add -t general check

altered the QA file  
rewrote the check\_impl.cc file

Created the build folder(/home/username/Thesis/OOT/gr-ACK/build

ran cmake …/  
ran make  
ran make test

Everything passed(after some debugging, array indices start at 0 btw)

I then ran gr\_modtool makexml check in the gr-ACK folder

Then cd build

sudo make install  
sudo ldconfig

gnuradio-companion

And I can’t find my module or block.

I have a feeling that I’m still installing gnuradio or my OOT blocks in  
the  
wrong places, but I’m not sure how to remedy it.

_ **check\_impl.cc** _\*\*

#ifdef HAVE\_CONFIG\_H  
#include “config.h”  
#endif

#include \<gnuradio/io\_signature.h\>  
#include “check\_impl.h”

namespace gr {  
namespace ACK {

```
check::sptr
check::make()
{
  return gnuradio::get_initial_sptr
    (new check_impl());
}

/*
 * The private constructor
 */
check_impl::check_impl()
  : gr::block("check",
          gr::io_signature::make(1,1, sizeof (float)),
          gr::io_signature::make(1,1, sizeof (float)))
{}

/*
 * Our virtual destructor.
 */
check_impl::~check_impl()
{
}

void
check_impl::forecast (int noutput_items, gr_vector_int

```

&ninput\_items\_required)  
{  
ninput\_items\_required[0] = noutput\_items;  
}

```
int
check_impl::general_work (int noutput_items,
                   gr_vector_int &ninput_items,
                   gr_vector_const_void_star &input_items,
                   gr_vector_void_star &output_items)
{
    const float *in = (const float *) input_items[0];
    float *out = (float *) output_items[0];

    // Do <+signal processing+>
    // Tell runtime system how many input items we consumed on
    // each input stream.

for(int i = 0; i < noutput_items ;i++)
{
    out[i] = in[i] * 2;
}

    consume_each (noutput_items);

    // Tell runtime system how many output items we produced.
    return noutput_items;
}

```

} /\* namespace ACK _/  
} /_ namespace gr \*/

_ **qa\_check.py** _\*\*\*\*\*\*\*\*\*\*\*

#!/usr/bin/env python

from gnuradio import gr, gr\_unittest  
from gnuradio import blocks  
import ACK\_swig as ACK

class qa\_check (gr\_unittest.TestCase):

```
def setUp (self):
    self.tb = gr.top_block ()

def tearDown (self):
    self.tb = None

def test_001_check (self):

src_data = (3, 4, 5.5, 2, 3)
expected_result = (6, 8, 11, 4, 6)
src = blocks.vector_source_f(src_data)
sqr = ACK.check()
dst = blocks.vector_sink_f()
self.tb.connect(src,sqr)
self.tb.connect(sqr,dst)
self.tb.run()
result_data = dst.data()
self.assertFloatTuplesAlmostEqual(expected_result,result_data,6)

```

if **name** == ‘ **main** ’:  
gr\_unittest.run(qa\_check, “qa\_check.xml”)

I really appreciate all of your time,

Logan Washbourne  
Electrical Engineering Graduate Student  
(Electromagnetics)

---

<div class="post-metadata">

**Author:** ![WashbourneS\_Logan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ec9cab/32.png) [@WashbourneS\_Logan](https://www.ruby-forum.com/u/WashbourneS_Logan)\
**Post date:** [August 9, 2015, 12:44am UTC](https://www.ruby-forum.com/t/oot-block-not-showing-in-grc/242943/2 "2015-08-09T00:44:46Z")

</div>

Hi Logan:

I just went through the same process! My new OOT block wasn’t being  
found. The solution is to add a [grc] segment to the config.conf file  
in ~/.gnuradio:

I had to create the .gnuradio directory, then add the simple two-line  
[grc] stanza to a new config.conf file:

[grc]  
local\_blocks\_path=/usr/local/share/gnuradio/grc/blocks

This tells grc to look for additional blocks in the stated directory.  
So you would do something like:

cd  
mkdir .gnuradio  
cd .gnuradio  
vi config.conf

Then add the two lines above, your OOT block install path may be  
different so I’d check it first.

Hope this helps,

Kevin

---

<div class="post-metadata">

**Author:** ![WashbourneS\_Logan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ec9cab/32.png) [@WashbourneS\_Logan](https://www.ruby-forum.com/u/WashbourneS_Logan)\
**Post date:** [August 9, 2015, 12:55am UTC](https://www.ruby-forum.com/t/oot-block-not-showing-in-grc/242943/3 "2015-08-09T00:55:17Z")

</div>

That’s one way to skin the cat. You can also use an install prefix with  
cmake.

cmake -DCMAKE\_INSTALL\_PREFIX=/opt/gnuradio/pybombs …/

Ron

---

<div class="post-metadata">

**Author:** ![WashbourneS\_Logan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ec9cab/32.png) [@WashbourneS\_Logan](https://www.ruby-forum.com/u/WashbourneS_Logan)\
**Post date:** [August 9, 2015, 1:01am UTC](https://www.ruby-forum.com/t/oot-block-not-showing-in-grc/242943/4 "2015-08-09T01:01:08Z")

</div>

Yes. I will cause your OOT blocks to be installed in the same place as  
all the other GNU Radio blocks.

Ron

---

<div class="post-metadata">

**Author:** ![WashbourneS\_Logan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ec9cab/32.png) [@WashbourneS\_Logan](https://www.ruby-forum.com/u/WashbourneS_Logan)\
**Post date:** [August 9, 2015, 1:04am UTC](https://www.ruby-forum.com/t/oot-block-not-showing-in-grc/242943/5 "2015-08-09T01:04:04Z")

</div>

* * *

Discuss-gnuradio mailing list  
removed\_email\_address@domain.invalid  
[https://lists.gnu.org/mailman/listinfo/discuss-gnuradio](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)

---

<div class="post-metadata">

**Author:** ![WashbourneS\_Logan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ec9cab/32.png) [@WashbourneS\_Logan](https://www.ruby-forum.com/u/WashbourneS_Logan)\
**Post date:** [August 9, 2015, 12:57am UTC](https://www.ruby-forum.com/t/oot-block-not-showing-in-grc/242943/6 "2015-08-09T00:57:38Z")

</div>

Kevin,

It worked! I really appreciate your help!!

Ron,

So that install prefix should be pointing to where I installed gnuradio?

(Never can know too many ways to skin a cat-metaphorically)

Logan Washbourne  
Electrical Engineering Graduate Student  
(Electromagnetics)

---

<div class="post-metadata">

**Author:** ![WashbourneS\_Logan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ec9cab/32.png) [@WashbourneS\_Logan](https://www.ruby-forum.com/u/WashbourneS_Logan)\
**Post date:** [August 9, 2015, 1:07am UTC](https://www.ruby-forum.com/t/oot-block-not-showing-in-grc/242943/7 "2015-08-09T01:07:34Z")

</div>

Ron,

Thanks for the info!

Logan

Sent from my Cyanogen phone
