[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Updating old 802.15.4 code to latest release

From: Leslie Choong
Subject: Re: [Discuss-gnuradio] Updating old 802.15.4 code to latest release
Date: Tue, 4 Nov 2008 08:58:51 -0800

Hi Dimitris, I did find the source of the problem. I needed to add
"self" at the beginning (and sometimes end) of the argument list for
self.connect(). I looked through examples in the gnuradio codebase.
Jonathan offered this explanation as to why it is wired up that way
when I didn't think it made much sense:

> Is there a reason for having self be passed along the way it is in 
> hier_block2?

Yes.  "self" in the connect command refers to an external port of the
hierarchical block.  Many hierarchical blocks are linear chains of
blocks internally, with a single external input port and a single
external output port.  The shortcut method of wiring these is:

self.connect(self, ..., ..., ..., ..., self)

The non-shortcut way:

self.connect(self, 0, ..., ...)
self.connect(..., ...., self. 0)

This means "connect external input port 0 to block ..., input port ..."
and "connect block ..., output port ... to external output port 0".


I hope that helps you out! Let me know if that fixed the problem. Good luck!

On Tue, Nov 4, 2008 at 7:23 AM, Dimitris Symeonidis <address@hidden> wrote:
> Hi Leslie,
> I have encountered the same problem in my RDS code
> (https://www.cgran.org/wiki/RDS)
> The error comes up because I have a top_block that creates a msg_queue
> and passes it (as an argument) to a hier_block2.
> This hier_block2 then outputs to the queue. I am receiving the same
> error message (try running rds_scope_pll_test.py under src/python,
> which calls rds_rx.py).
> I haven't yet had the time to look into this, because I resolved it by
> integrating the hier_block2 functionality inside the top_block (look
> at usrp_rds_scope_pll.py)
> If you do find the source of the problem, I would appreciate it if you
> pass it on to me
> Kind regards, and good luck
> Dimitris Symeonidis
> "If you think you're too small to make a difference, try sleeping with
> a mosquito!" - Amnesty International
> On Wed, Oct 29, 2008 at 03:34, Leslie Choong <address@hidden> wrote:
>> Hi everyone,
>> I'm currently updating Thomas Schmid's old 802.15.4 demodulation code.
>> It has been tested and works with at least revision 7596 of the
>> gnuradio trunk. I've been trying to update the code to work with the
>> latest release of Gnuradio (3.1). I've looked at examples converting
>> from hier_block to hier_block2 and flow_graph to top_block. I've
>> implemented those changes but still run into this error:
>> python: /usr/include/boost/shared_ptr.hpp:375: T*
>> boost::shared_ptr<T>::operator->() const [with T = gr_basic_block]:
>> Assertion `px != 0' failed.
>> Searches for this error on the list did not turn up much. I was
>> wondering if there was anything else that I missed. I've been banging
>> my head on the wall about this trying to figure out a fix. I jumped
>> into gdb and found that the code was crashing when trying to flatten
>> the flow_graph. I turned on debugging messages for
>> gr_hier_block2_detail.cc and here is the result of that:
>> connecting: ieee802_15_4_demod(3):0 -> sos_packet_sink(8):0
>> connect: src is hierarchical, setting parent to 0x89e3d00
>> connecting: usrp1_source_c(1):0 -> pwr_squelch_cc(9):0
>> connecting: pwr_squelch_cc(9):0 -> ieee802_15_4_demod_pkts(2):0
>> connect: dst is hierarchical, setting parent to 0x88bc270
>> start: entered
>> flattening top_block
>> Flattening edge usrp1_source_c(1):0->pwr_squelch_cc(9):0
>> Flattening edge pwr_squelch_cc(9):0->ieee802_15_4_demod_pkts(2):0
>> Resolving endpoint ieee802_15_4_demod_pkts(2):0 as an input, recursing
>> Resolving port 0 as an input of ieee802_15_4_demod_pkts
>> python: /usr/include/boost/shared_ptr.hpp:375: T*
>> boost::shared_ptr<T>::operator->() const [with T = gr_basic_block]:
>> Assertion `px != 0' failed.
>> Aborted
>> I have attached a patch for anyone who wants to look further. If you'd
>> like to see all the code you can follow these steps to try it out
>> yourself:
>> svn checkout svn://acert.ir.bbn.com/svn/gr-ucla
>> cd gr-ucla/trunk
>> (copy changes.diff to this directory)
>> patch -p0 -i changes.diff
>> Then build it all:
>> ./bootstrap && ./configure && make
>> sudo make install
>> then:
>> cd src/examples
>> ./cc2420_rxtest.py
>> If you have any comments or leads on something else that I should look
>> into I would really appreciate hearing it. Thanks for all your help!
>> -Leslie Choong
>> _______________________________________________
>> Discuss-gnuradio mailing list
>> address@hidden
>> http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

reply via email to

[Prev in Thread] Current Thread [Next in Thread]