Forum: GNU Radio gr-rds

5198317011bab6bfffa1535322b118a8?d=identicon&s=25 Bastian Bloessl (Guest)
on 2014-01-08 08:29
(Received via mailing list)
Hi all,

Clayton and I worked on the FM RDS project over the last weeks. I think
that the receiving side is in a pretty good state now. It works well
with the RTL SDR.

You can find a demo here:
www.youtube.com/watch?v=05i9C5lhorY

and the code here:
https://github.com/bastibl/gr-rds

There was also a talk about FM RDS at 30C3:
http://www.youtube.com/watch?v=R-2k6TMPMRo

Best,
Bastian
2474e637cd95190b38f78b5655f795e2?d=identicon&s=25 Nowlan, Sean (Guest)
on 2014-01-08 19:09
(Received via mailing list)
> Clayton and I worked on the FM RDS project over the last weeks. I think that the
receiving side is in a pretty good state now. It works well with the RTL SDR.

This is really cool! Worked right out of the box. It's decoding and
displaying the local NPR station without any problems.

Sean
61c77a894cdbfa79d5b1c9a40ccab08b?d=identicon&s=25 "Ulf Söderberg" <ulf@soderbergsoftware.com> (Guest)
on 2014-01-11 22:34
(Received via mailing list)
> Clayton and I worked on the FM RDS project over the last weeks. I think that the
receiving side is in a pretty good state now. It works well with the RTL SDR.

I wonder how to get this working on Mac OS X with the macports version
of GNU Radio.

I downloaded gr-rds and followed the install procedure with the
following modification to the cmake command

cmake -DCMAKE_INSTALL_PREFIX=/opt/local

Everything seems to build and install fine, but when I try to run the
apps/rds_rx.grc in GNU Radio Companion I get the following error
message:

Traceback (most recent call last):
  File
"/Users/ulf/Documents/Projects/gnuradio/gr-rds-master/apps/rds_rx.py",
line 28, in <module>
    import rds
ImportError: No module named rds

Any ideas?

/Ulf
5198317011bab6bfffa1535322b118a8?d=identicon&s=25 Bastian Bloessl (Guest)
on 2014-01-12 08:55
(Received via mailing list)
Hi Ulf,

On 2014-01-11 22:32, Ulf Sderberg wrote:
>> Clayton and I worked on the FM RDS project over the last weeks. I think that
the receiving side is in a pretty good state now. It works well with the RTL 
SDR.
>
> I wonder how to get this working on Mac OS X with the macports version of GNU
Radio.
>
> Traceback (most recent call last):
>    File "/Users/ulf/Documents/Projects/gnuradio/gr-rds-master/apps/rds_rx.py",
line 28, in <module>
>      import rds
> ImportError: No module named rds


Python can't find the module. It should be at
/opt/local/lib/python2.7/site-packages and you have to add

export PYTHONPATH=/opt/local/lib/python2.7/site-packages

to you .bashrc.

However, I ran into problems with the shared libraries when I installed
it under /opt/local. I would recommend to installed it somewhere in your
home, like ~/usr. Then you have to add to your .bashrc something like

export PYTHONPATH=/Users/ulf/usr/lib/python2.7/site-packages
export DYLD_LIBRARY_PATH=/Users/ulf/usr/lib

Best,
Bastian
49c4e5d024c18583bd6ca53aba800d29?d=identicon&s=25 Michael Dickens (Guest)
on 2014-01-13 22:04
(Received via mailing list)
Hi Ulf - If this is still an issue, here's my US$0.02 worth:

Yes: Python can't find the module.  If you installed into /opt/local,
then I agree with Bastian that the RDS Python related files were
probably installed into /opt/local/lib/python2.7/site-packages .  If you
look in that directory do you see any obviously named files?

I -highly- recommend against setting DYLD_LIBRARY_PATH in your standard
shell environment ... it will eventually lead to headaches.  The only
reasonable time to use DYLD_LIBRARY_PATH is when running a script to do
local testing / execution ... for example, CMake does this in "make
test", such that locally created libraries are found ahead of already
installed ones.

That said, I'd bet that the issue is that CMake is not linking the RDS
library/ies correctly.  You can check this if you can find the .so
and/or .dylib created by this project (e.g.,
{{{
find . -name "*.dylib"
}}}
when you're in the RDS build directory; substitute ".so" for ".dylib" to
look for the other type.  Then, once they are found, do "otool -L
<filename>" to see what the linkage is.  I'll bet that either the
self-id (the first entry; should be the exact filename including path as
the actual library file), or one of the linked-to libraries is not
correct.

CMake has settings to correct that, which I can pass on if this is the
issue; it's an easy fix to some CMakeLists.txt files.

Hope this helps! - MLD
--
Michael Dickens, Mac OS X Programmer
Ettus Research Technical Support
Email: support@ettus.com
Web: http://www.ettus.com
5198317011bab6bfffa1535322b118a8?d=identicon&s=25 Bastian Bloessl (Guest)
on 2014-01-14 07:25
(Received via mailing list)
On 2014-01-13 22:03, Michael Dickens wrote:
> That said, I'd bet that the issue is that CMake is not linking the RDS library/ies 
correctly.
> CMake has settings to correct that, which I can pass on if this is the issue; it's an 
easy fix to some CMakeLists.txt files.

...I guess you are talking about changing the RPATH. Can you please
point me to a module that does it right so that I can change it? I
checked several but didn't find the relevant parts.
49c4e5d024c18583bd6ca53aba800d29?d=identicon&s=25 Michael Dickens (Guest)
on 2014-01-14 22:55
(Received via mailing list)
On Jan 14, 2014, at 1:24 AM, Bastian Bloessl
<bastian.bloessl@uibk.ac.at> wrote:
> ...I guess you are talking about changing the RPATH. Can you please point me to
a module that does it right so that I can change it? I checked several but 
didn't
find the relevant parts.

Not RPATH; that's messed up and I don't recommend using it any more than
necessary.  I'm taking about the absolute path.  See my prior email on
this subject.  Here's what you do in CMake to fix this:
{{{
    IF(APPLE)
        SET_TARGET_PROPERTIES([LIBRARY] PROPERTIES
            INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${LIBRARY_DIR}"
        )
    ENDIF(APPLE)
}}}
where [LIBRARY] is the CMake name for the library as defined by the
first argument to ADD_LIBRARY, and LIBRARY_DIR is traditionally used to
define where libraries are installed.  You might use different names
than this, but I think you can figure this out.  If you add this to both
the .so and .dylib CMakeLists.txt files, it should fix this issue since
CMake will then handle setting both the self-id and then any linkage
correctly both for "make test" as well as after "install".

Let me know if you want more direct help. - MLD
5198317011bab6bfffa1535322b118a8?d=identicon&s=25 Bastian Bloessl (Guest)
on 2014-01-15 09:42
(Received via mailing list)
On 2014-01-14 14:21, Michael Dickens wrote:
> Let me know if you want more direct help. - MLD
I never heard about install_name_dir, but I just pushed a fix and
hopefully I got it right now :-)
Thanks for your help!

Btw if this is the way to link under OSX it might be a good idea to add
this to the template of gr_modtool.
B4ffbc711addde4c649b1ed526df6157?d=identicon&s=25 Martin Braun (Guest)
on 2014-01-15 11:07
(Received via mailing list)
On Wed, Jan 15, 2014 at 06:44:51AM +0100, Bastian Bloessl wrote:
> >
> >Let me know if you want more direct help. - MLD
>
> I never heard about install_name_dir, but I just pushed a fix and
> hopefully I got it right now :-)
> Thanks for your help!
>
> Btw if this is the way to link under OSX it might be a good idea to
> add this to the template of gr_modtool.

Good point, it seems like a harmless patch. Michael, what do you think?

MB
49c4e5d024c18583bd6ca53aba800d29?d=identicon&s=25 Michael Dickens (Guest)
on 2014-01-15 14:53
(Received via mailing list)
Sure; if it's not in there already, it should be.  I much prefer -all-
binaries (executables, libraries, shared objects, etc) to have correct
linkage include self-id -- because it's good coding practice as much as
anything else.  I say go for it.  One of these days I'll get around to
trying out modtool on OSX to see if/how it works :) - MLD
49c4e5d024c18583bd6ca53aba800d29?d=identicon&s=25 Michael Dickens (Guest)
on 2014-01-15 20:27
(Received via mailing list)
Hi Bastian - Your change (commit 340cda20) looks like it should do the
trick for the primary library.  Thanks for getting that added, and so
promptly! - MLD
49c4e5d024c18583bd6ca53aba800d29?d=identicon&s=25 Michael Dickens (Guest)
on 2014-01-16 12:25
(Received via mailing list)
On Jan 15, 2014, at 12:46 PM, Martin Braun <martin.braun@ettus.com>
wrote:
> OK, can you please make sure I didn't mess anything up here. It's a
> pretty simple patch, but I know bugger-all about OSX :)
>
>
https://github.com/mbr0wn/gnuradio/commit/5743258c...
>
> Just give me a quick thumbs-up (or -down) and I'll make sure it gets
> merged (or fixed).

Yes, that's fine.  Why not use ${GR_LIBRARY_DIR} instead of "lib"?
It'll be correct, but globally settable from the top-level
CMakeLists.txt file.

Another change (not related to the OSX-specific one above): In the
"install(TARGETS", why not do:
lib${LIB_SUFFIX} -> ${GR_LIBRARY_DIR}
bin -> ${GR_RUNTIME_DIR}
? - MLD
8092aa305da50c37ad3774c14988a5bc?d=identicon&s=25 kai g (Guest)
on 2014-01-18 13:45
(Received via mailing list)
Hi there,

I had to to do

sudo install_name_tool -change
/System/Library/Frameworks/Python.framework/Versions/2.7/Python
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Python
/opt/local/lib/python2.7/site-packages/rds/_rds_swig.so

in order to point to the right python.

Now it works for me!

Best regards,
kai




--
View this message in context:
http://gnuradio.4.n7.nabble.com/gr-rds-tp45634p45792.html
Sent from the GnuRadio mailing list archive at Nabble.com.
781e96b7bd64e8833d71e3914cb1594a?d=identicon&s=25 Michael Dickens (Guest)
on 2014-01-18 14:46
(Received via mailing list)
Hi Kai - gr-rds is now in MacPorts if you want to install it from there.
That said, if it works from you outside of MacPorts, that's great too!
Mine works nicely with a Jawbreaker, but not with my B210 because there
are some issues between gr-osmosdr and UHD that we're now working on
resolving.  Enjoy! - MLD
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.