RTL-SDR and PKG_CONFIG_PATH issue with BeagleBone + dump1090

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
carriere4
 
Posts: 12
Joined: Fri Jan 16, 2015 3:36 pm

RTL-SDR and PKG_CONFIG_PATH issue with BeagleBone + dump1090

Post by carriere4 »

So I'm trying to get a MAKE project to work with my BeagleBone Black.
Here's the projetct: http://makezine.com/projects/make-43/tr ... h-rtl-sdr/

I've followed the instructions, yet am getting hung up with a package installation. When I run make I get this:

root@beaglebone:~/dump1090# make
gcc -O2 -g -Wall -W `pkg-config --cflags librtlsdr` -c dump1090.c
Package librtlsdr was not found in the pkg-config search path.
Perhaps you should add the directory containing `librtlsdr.pc'
to the PKG_CONFIG_PATH environment variable
No package 'librtlsdr' found
dump1090.c:46:21: fatal error: rtl-sdr.h: No such file or directory
compilation terminated.
make: *** [dump1090.o] Error 1
root@beaglebone:~/dump1090# cd
root@beaglebone:~# git clone git://git.osmocom.org/rtlsdr.git
Cloning into 'rtlsdr'...
fatal: remote error: access denied or repository not exported: /rtlsdr.git

Any ideas? Thanks so much.

Charles

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: RTL-SDR and PKG_CONFIG_PATH issue with BeagleBone + dump

Post by adafruit_support_mike »

Typo: you need a dash between 'rtl' and 'sdr':

Code: Select all

git clone git://git.osmocom.org/rtl-sdr.git

tintar
 
Posts: 24
Joined: Tue Jun 24, 2014 2:00 pm

Re: RTL-SDR and PKG_CONFIG_PATH issue with BeagleBone + dump

Post by tintar »

(that MAKE thing is 700% over-complicated, wow)
use this guide instead, it has never gone wrong for me, works great on both ARM and Intel:
http://www.satsignal.eu/raspberry-pi/dump1090.html

also, I usually run the software with these flags:
./dump1090 --interactive --net --aggressive --lat 41.xxx --lon -70.xxx --enable-agc --modeac
(you can always change the web tcp port with --net-http-port if you're already using 8080 for something else)

also recommend setting/correcting map lat/lon and station lat/lon in: public_html/config.js


this script is a shorthand version of everything in that page:
http://www.satsignal.eu/raspberry-pi/build-1090.sh (the only thing the script leaves out is that you may need pkg-config to build dump1090)

Code: Select all

sudo apt-get update
 sudo apt-get upgrade
 sudo printf 'blacklist dvb_usb_rtl28xxu\nblacklist rtl2832\nblacklist rtl2830' > /etc/modprobe.d/nortl.conf
 sudo apt-get install git-core
 sudo apt-get install git
 sudo apt-get install cmake
 sudo apt-get install libusb-1.0-0-dev  
 sudo apt-get install build-essential 
 git clone git://git.osmocom.org/rtl-sdr.git
 cd rtl-sdr
 mkdir build
 cd build
 cmake ../ -DINSTALL_UDEV_RULES=ON
 make
 sudo make install
 sudo ldconfig
 cd ~
 sudo cp ./rtl-sdr/rtl-sdr.rules /etc/udev/rules.d/
 git clone git://github.com/MalcolmRobb/dump1090.git
 cd dump1090
 make
 sudo reboot

tintar
 
Posts: 24
Joined: Tue Jun 24, 2014 2:00 pm

Re: RTL-SDR and PKG_CONFIG_PATH issue with BeagleBone + dump

Post by tintar »

2 other small notes:
- I've never had to reboot to get it all working, but maybe that's only me...
- I've always been too lazy to daemonize it, I just open a screen session, run it there, and detach

EDIT: sorry, 2 more small notes that popped into my head, before I forget them:
- the tiny antenna that comes with those is complete junk, you may not detect anything even if you live very near an airport.
- I'm not sure offhand what the output is on the BBB A-port, but in my experience 500ma is not always enough to run a typical one of these DVB-T sticks. I always have used powered USB hubs.

User avatar
carriere4
 
Posts: 12
Joined: Fri Jan 16, 2015 3:36 pm

Re: RTL-SDR and PKG_CONFIG_PATH issue with BeagleBone + dump

Post by carriere4 »

adafruit_support_mike - thanks for that typo heads-up. I had tried it that way without the hyphen when it didn't work with the hypen the first time.
I went through all of the instructions again - and this is what I got:

root@beaglebone:~/dump1090# ./dump1090 --interactive --net --net-http-port 8081
./dump1090: error while loading shared libraries: librtlsdr.so.0: cannot open shared object file: No such file or directory

Here is the output from the last few instructions:
root@beaglebone:~# git clone https://github.com/MalcolmRobb/dump1090 dump1090
Cloning into 'dump1090'...
remote: Counting objects: 1401, done.
remote: Compressing objects: 100% (549/549), done.
remote: Total 1401 (delta 839), reused 1401 (delta 839)
Receiving objects: 100% (1401/1401), 4.13 MiB | 626 KiB/s, done.
Resolving deltas: 100% (839/839), done.
root@beaglebone:~# cd dump1090
root@beaglebone:~/dump1090# make
gcc -O2 -g -Wall -W `pkg-config --cflags librtlsdr` -c dump1090.c
gcc -O2 -g -Wall -W `pkg-config --cflags librtlsdr` -c anet.c
gcc -O2 -g -Wall -W `pkg-config --cflags librtlsdr` -c interactive.c
gcc -O2 -g -Wall -W `pkg-config --cflags librtlsdr` -c mode_ac.c
gcc -O2 -g -Wall -W `pkg-config --cflags librtlsdr` -c mode_s.c
gcc -O2 -g -Wall -W `pkg-config --cflags librtlsdr` -c net_io.c
gcc -g -o dump1090 dump1090.o anet.o interactive.o mode_ac.o mode_s.o net_io.o `pkg-config --libs librtlsdr` -lpthread -lm
gcc -O2 -g -Wall -W `pkg-config --cflags librtlsdr` -c view1090.c
gcc -g -o view1090 view1090.o anet.o interactive.o mode_ac.o mode_s.o net_io.o `pkg-config --libs librtlsdr` -lpthread -lm
root@beaglebone:~/dump1090# ./dump1090 --interactive --net --net-http-port 8081
./dump1090: error while loading shared libraries: librtlsdr.so.0: cannot open shared object file: No such file or directory


Any advice you can give me? I'm determined to get this project going, despite my lack of Linux skills!

Thanks so much for the replies.

Charles

User avatar
carriere4
 
Posts: 12
Joined: Fri Jan 16, 2015 3:36 pm

Re: RTL-SDR and PKG_CONFIG_PATH issue with BeagleBone + dump

Post by carriere4 »

tintar -

Thanks for your post - I'm going to spend some time going through it to see if I can make heads or tails of it. As you can surmise from my posts, I am brand-spanking new to Linux.

It is safe to assume that since both BeagleBone Black and Raspberry Pi are running Linux, that instructions are interchangeable? How much damage would I do to my BBB if I use RPi commands?

Thanks for taking the time to answer my questions.

Charles

tintar
 
Posts: 24
Joined: Tue Jun 24, 2014 2:00 pm

Re: RTL-SDR and PKG_CONFIG_PATH issue with BeagleBone + dump

Post by tintar »

hi Charles

there is nothing to worry, technically it's not even "raspi program", it's simply sourcecode being compiled for whatever platform you are building on.

osmocom's rtl-sdr library ought to work on nearly any linux hardware platform, without modification.

the original dump1090 written by antirez, and then Malcolm Robb's updated branch - I think they wanted a fun project for rPI, but they wrote very generic code, so it's not specific to rPI. it won't harm or damage BBB.


in fact, I have built + run this with zero problem on:

- BBB/debian
- BBB/archlinux
- BBB/ubuntu

- PogoPlug/archlinux-armv5

- Intel Edision / debian-i386

- generic machine / ubuntu-i386
- generic machine / ubuntu-x86_64

so again don't worry that rPI is mentioned. in fact, in one photo of that MAKE article, they are running it on MacOSX :)

...

original problem was build issue, but now that you successfully built, this new problem is a runtime issue.

if you already first tried:

$ sudo ldconfig

or if you're doing this all as root, as it looks like, then instead simply:

# ldconfig

and that didn't help?



hm, are you running the earlier Angstrom OS? I think its linker maybe was set up differently.

you could try something like:

# export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/
# ./dump1090

User avatar
carriere4
 
Posts: 12
Joined: Fri Jan 16, 2015 3:36 pm

Re: RTL-SDR and PKG_CONFIG_PATH issue with BeagleBone + dump

Post by carriere4 »

tintar -
THANK YOU! I ran the ldconfig and that did it. Tracking planes just as the project intended. Many many thanks for your help!

Best,

Charles

tintar
 
Posts: 24
Joined: Tue Jun 24, 2014 2:00 pm

Re: RTL-SDR and PKG_CONFIG_PATH issue with BeagleBone + dump

Post by tintar »

awesome! glad it's running! :)

technically the same thing can be accomplished running nothing more than "rtl_adsb" from the osmocom package. but dump1090 adds the very nice simplified map + webserver, and some more flexible features/networking etc.

once dump1090 is running with --net, you'll automatically have live data ports, in both ascii and binary, in standard formats. i.e. if you want to look at the output in other ways, remote ways... e.g. from a windows PC, take a look at these free software clients:
http://www.sprut.de/electronic/pic/proj ... en.html#pc

adsbscope is neat, and you can download all sorts of maps into it. can look at raw data, and also human-understandable equivalents. as in, actually see the back and forth conversations between plane and tower/ATC.

rtl1090/adsb# is more basic, although I think they added a scope/map last year.

((sorry for the off-topic PC stuff, but just in case anyone reading might be interested))

EDIT: small note: to use any external or remote program to receive/interpret/view data from dump1090, client program should be set pointing to the BBB IP address, and either of these will work:
- port 30002, normal/ascii
- port 30005, binary
(I don't think either stream has more information than the other. just that some clients may only be able to use 1 format or the other)

Locked
Please be positive and constructive with your questions and comments.

Return to “Beagle Bone & Adafruit Beagle Bone products”