Using OFDM


#1

Hi,

I was trying to use OFDM from gnuradio. I made my own .xml to handle
it in GRC and it is designed to make a call like this :
self.blks2_ofdm_mod_0 = blks2.ofdm_mod(
options=my_utils.make_ofdm_options(mod=“qpsk”, fft=512, cp=128,
tones=200, verbose=True, log=False),
msgq_limit=2,
pad_for_usrp=True
)
where make_ofdm_options() builds a namedtuple object containing the
parameters.

I only obtain this error and I really don’t know what I made wrong.

OFDM Modulator:
Modulation Type: qpsk
FFT length: 512
Occupied Tones: 200
CP length: 128

gr_fir_ccf: using SSE
gr_fir_ccc: using SSE
Traceback (most recent call last):
File “./ofdm_full.py”, line 120, in
tb = ofdm_full()
File “./ofdm_full.py”, line 84, in init
self.connect((self.gr_file_source_0, 0), (self.blks2_ofdm_mod_0,
0))
File “/usr/local/lib/python2.5/site-packages/gnuradio/gr/
top_block.py”, line 99, in connect
self._connect(points[i-1], points[i])
File “/usr/local/lib/python2.5/site-packages/gnuradio/gr/
top_block.py”, line 105, in _connect
dst_block.basic_block(), dst_port)
File “/usr/local/lib/python2.5/site-packages/gnuradio/gr/
gnuradio_swig_py_runtime.py”, line 1469, in connect
return _gnuradio_swig_py_runtime.gr_top_block_sptr_connect(*args)
ValueError: port number 0 exceeds max of (none)

Any idea ?

Jérémy


#2

My guess is that the ofdm mod has 1 output port, but no input ports.
That is why you get the error for port number 0 exceeds… The input to
the ofdm modulator is actually a python function called send_packet (or
something similar).

The blks2 pkt mod and demod blocks have the same “issue”. To use them in
GRC, i basically made custom blocks that have actual inputs and outputs.
Between the inputs and outputs is a thread that reads the input, calls
the packet framer or correlator function, and writes to output.

I was planning to do a similar custom wrapper for ofdm blocks in GRC,
whenever their api stabilizes… has it?

Should the input and output of gnuradio blocks be python functions?
Probably not. Is this were mblocks have a use? Maybe.

-josh