Trouble Wrapping BPSK mapper with Python using SWIG

Hey everyone,

This is my first post, so allow me to introduce myself really quick.
My name is Jeff and I’m a UCLA student working on a GNU Radio Project
where I will attempt and hopefully succeed to implement BPSK
modulation/demodulation on a GNU Radio with a USRP - hopefully being
able to send something over to another GNU Radio with BPSK modulation
and being able to demodulate it on the other end.

I’ve run into a problem though - I’m trying to wrap
gr_ofdm_bpsk_mapper.cc with Python using SWIG, but when I try to run
it in python, I get this error:

jeffc3s@Ubuntu7:~/gnuradio/gnuradio-core/src/lib/general$ python
gr_ofdm_bpsk_mapper.py

Traceback (most recent call last):
File “gr_ofdm_bpsk_mapper.py”, line 7, in
import _gr_ofdm_bpsk_mapper
ImportError:
/home/jeffc3s/gnuradio/gnuradio-core/src/lib/general/_gr_ofdm_bpsk_mapper.so:
undefined symbol: _ZN11omni_thread6init_tC1Ev

I’ve generated the .o and .so files required (I followed the SWIG
Python module tutorial), but now I don’t know what is wrong. Anyone
have any idea? I sure could use the help. Thanks in advance!!!

  • Jeffrey

Jeffrey J. Ung wrote:

gr_ofdm_bpsk_mapper.cc with Python using SWIG, but when I try to run
/home/jeffc3s/gnuradio/gnuradio-core/src/lib/general/_gr_ofdm_bpsk_mapper.so:
undefined symbol: _ZN11omni_thread6init_tC1Ev

I’ve generated the .o and .so files required (I followed the SWIG
Python module tutorial), but now I don’t know what is wrong. Anyone
have any idea? I sure could use the help. Thanks in advance!!!

  • Jeffrey

Have you successfully built and run any GNU Radio components? When you
build and install the code, the OFDM stuff should be there and ready for
use.

Also, for you’re BPSK, are you actually wanting to do OFDM with BPSK, or
a narrowband implementation of BPSK? If the narrowband, there is already
a DBPSK (and DQPSK) block distributed with the code (from gnuradio
import blks). There has been some discussion on the list about
implementing BPSK, too. It’s more of a control logic issue than anything
(making sure the phase rotation is correctly compensated for). Running
in a simple simulation, I’ve managed to demonstrate that the BPSK, QPSK,
8PSK, DBPSK, DQPSK, D8PSK, QAM{8, 16, 64, 256} modulators/demodulators
all work. It’ll just be some work to get them all to be synchronized and
phase locked properly when run over the air.

Tom