Hi everyone,
Firstly, just a
disclaimer. I am particularly familiar with GnuRadio at all. However I
need to interface with a GnuRadio project.
I
am trying to manually decode the output of a ZMQ PUB Sink. In other
words, I have, in a completely different non-gnuradio project, a bit of
code that uses the standard python-zmq library to subscribe to the zmq
socket.
The ZMQ PUB Sink block is sitting just
before the USRP block in the Tx chain. And what I eventually want to do is effectively
replicate the spectrum display from Gnu Radio in a web app.
In
my long google searches someone said the trick to decode things from
gnuradio is to use the PMT library. Now from what I could see I should
use pmt.deserialize_string(). However that does not seem to work.
>>> pmt.deserialize_str(d)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/pmt/pmt_swig.py", line 3373, in deserialize_str
return _pmt_swig.deserialize_str(str)
RuntimeError: pmt::deserialize: malformed input stream, tag value = : 243