Creating signal processing blocks in Python on Windows

Hi all,

I have recently installed GNU Radio on Windows according to the
instructions at
http://code.ettus.com/redmine/ettus/projects/uhd/wiki/GNURadio_Windows,
and have played around with some simple examples in GNU radio
companion. No problems there. But I am not sure which steps you should
take in order to be able to use blocks you have written yourself in
Python (using GrExtras) in radio companion. Modifying/adding xml files
in share/gnuradio/grc/blocks seemed to add my new block to the list of
available blocks, but when I try to execute I get the message

Win32; Microsoft Visual C++ version 10.0; Boost_104700;
UHD_003.004.003-release

Using Volk machine: sse2

and nothing else happens. I have not been able to find an answer in
the online documentation. I apologize in advance for the basic
question.

Regards,
Tomas

Thank you for your help! It seems that the problem is with my gnuradio
installation in general rather than with my signal processing block
implementation. When I add an Extras:divide block to an existing
example in grc everything works fine, but when I add an
Extras:packetframer block (which is implemented in Python) to the same
example it crashes when the python script specifies how the blocks are
connected, right before the

self.connect((self.gr_null_source_2, 0), (self.extras_packet_framer_0,
0))

line. I get some Traceback written to the wxPython window, but
unfortunately it closes before I can see what it says.

I have added the gnuradio\lib\site-packages and
gnuradio\lib\site-packages\gnuradio directories to my PYTHONPATH.

Any further help would be most appreciated.

Regards,
Tomas

On 08/10/2012 07:48 AM, Tomas Johansson wrote:

available blocks, but when I try to execute I get the message

Win32; Microsoft Visual C++ version 10.0; Boost_104700; UHD_003.004.003-release

Using Volk machine: sse2

The above 2 are typical prints from libvolk and libuhd, thats good.

and nothing else happens. I have not been able to find an answer in
the online documentation. I apologize in advance for the basic
question.

You should really only need to put the block into your PYTHONPATH, you
know, so that you can import it using the python interpreter.

As far as GrExtras, I havent used it on windows. Just made sure it
builds and unit tests pass. Have you built/installed GrExtras from
source? Set PATH and PYTHONPATH? Able to use and call into blocks from
this project?

As far as the error above, is it freezing there? returning to the
terminal? It could be a segfault. It would be very helpful to find out
what the last line in the python app was before the app got to that
state. Was it run()/start()?

-Josh

On 08/13/2012 04:40 AM, Tomas Johansson wrote:

Thank you for your help! It seems that the problem is with my gnuradio
installation in general rather than with my signal processing block
implementation. When I add an Extras:divide block to an existing
example in grc everything works fine, but when I add an
Extras:packetframer block (which is implemented in Python) to the same
example it crashes when the python script specifies how the blocks are
connected, right before the

self.connect((self.gr_null_source_2, 0), (self.extras_packet_framer_0, 0))

Its probably an error about matching IO types. The packet framer is
tectonically supposed to input messages and output a byte stream. It
could be fed by a stream_to_blob block for example

-josh

On 08/13/2012 05:30 PM, Josh B. wrote:

self.connect((self.gr_null_source_2, 0), (self.extras_packet_framer_0, 0))

Its probably an error about matching IO types. The packet framer is
tectonically supposed to input messages and output a byte stream. It

Thank you guys for the many off-list replies. I was indeed thinking
about the earth’s crust when I wrote this response.

-josh

That was indeed the error. Thanks again for the help!

Regards,
Tomas

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs