Hello all,
I’m trying to write an OFDM mod/demod for the gnuradio companion and
I’m running into a problem. I’m following the (now deprecated?) packet
modulator code that was in GRC very closely. I have an OFDMDemod block
which creates the following class when its used:
class OFDMDemodHelper(gr.hier_block2):
“”“Forward data from ofdm demod to the gr data stream.”""
def init(self, item_size, options):
#create hier block
gr.hier_block2.init(
self, ‘ofdm_demod’,
gr.io_signature(1, 1, Complex().get_num_bytes()),
gr.io_signature(1, 1, item_size)
)
#the message source (handles the output data stream)
msg_source = gr.message_source(item_size, DEFAULT_QUEUE_LIMIT)
msgq = msg_source.msgq()
def callback(ok, payload):
if ok: msgq.insert_tail(gr.message_from_string(payload, 0,
item_size,
len(payload)/item_size))
ofdm_demod = blks.ofdm_demod(
fg=self,
options=options,
callback=callback,
)
#connections
self.connect(msg_source, self)
self.connect(self, ofdm_demod.head)
This is basically the same as the old packet demod code, with a few
small changes for OFDM. Unfortunately, I get the following error:
File “/home/dramudit/work/gnuradio/grc/src/SignalBlockDefs/Packet.py”,
line 337, in init
callback=callback,
File
“/usr/local/lib/python2.4/site-packages/gnuradio/blksimpl/ofdm.py”, line
218, in init
options.log)
File
“/usr/local/lib/python2.4/site-packages/gnuradio/blksimpl/ofdm_receiver.py”,
line 56, in init
self.fg.connect(self.chan_filt, self.ofdm_sync)
File
“/usr/local/lib/python2.4/site-packages/gnuradio/gr/hier_block2.py”,
line 46, in connect
self._connect(points[i-1], points[i])
File
“/usr/local/lib/python2.4/site-packages/gnuradio/gr/hier_block2.py”,
line 50, in _connect
(dst_block, dst_port) = self._coerce_endpoint(dst)
File
“/usr/local/lib/python2.4/site-packages/gnuradio/gr/hier_block2.py”,
line 61, in _coerce_endpoint
raise ValueError(“unable to coerce endpoint”)
ValueError: unable to coerce endpoint
Any suggestions as far as fixing this error, or another approach?
Thanks,
Dev