Orange Pi PC -- a $15 alternative to RPi 2? So far, so good

.
FAILED: Installation of dump1090-mutability v1,15~dev on Orange PI with OS “OrangePI_Jessie_Xfce”.

LOGEDIN AS USER “pi”



pi@OrangePI:~$ sudo apt-get update
pi@OrangePI:~$ sudo apt-get upgrade


Built & installed dump1090-mutability v1,15~dev useng mgunther’s method:
http://discussions.flightaware.com/post177419.html#p177419



pi@OrangePI:~$ wget https://github.com/mutability/librtlsdr/releases/download/v0.5.4_git-1/librtlsdr0_0.5.4.git-1_armhf.deb
pi@OrangePI:~$ wget https://github.com/mutability/librtlsdr/releases/download/v0.5.4_git-1/librtlsdr-dev_0.5.4.git-1_armhf.deb
pi@OrangePI:~$ sudo dpkg -i librtlsdr0_0.5.4.git-1_armhf.deb
pi@OrangePI:~$ sudo dpkg -i librtlsdr-dev_0.5.4.git-1_armhf.deb
pi@OrangePI:~$ sudo apt-get install git-core
pi@OrangePI:~$ mkdir git
pi@OrangePI:~$ cd git
pi@OrangePI:~/git$ git clone https://github.com/mutability/dump1090.git
pi@OrangePI:~/git$ sudo apt-get install librtlsdr-dev libusb-1.0-0-dev pkg-config debhelper
pi@OrangePI:~/git$ cd dump1090




pi@OrangePI:~/git/dump1090$ dpkg-buildpackage -b
dpkg-buildpackage: error: fakeroot not found, either install the fakeroot
package, specify a command with the -r option, or run this as root




pi@OrangePI:~/git/dump1090$ sudo apt-get install fakeroot
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libfakeroot
The following NEW packages will be installed:
  fakeroot libfakeroot
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 124 kB of archives.
After this operation, 373 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ftp.hr.debian.org/debian/ jessie/main libfakeroot armhf 1.20.2-1 [40.5 kB]
Get:2 http://ftp.hr.debian.org/debian/ jessie/main fakeroot armhf 1.20.2-1 [83.5 kB]
Fetched 124 kB in 1s (115 kB/s)
Selecting previously unselected package libfakeroot:armhf.
(Reading database ... 47191 files and directories currently installed.)
Preparing to unpack .../libfakeroot_1.20.2-1_armhf.deb ...
Unpacking libfakeroot:armhf (1.20.2-1) ...
Selecting previously unselected package fakeroot.
Preparing to unpack .../fakeroot_1.20.2-1_armhf.deb ...
Unpacking fakeroot (1.20.2-1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up libfakeroot:armhf (1.20.2-1) ...
Setting up fakeroot (1.20.2-1) ...
update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode




pi@OrangePI:~/git/dump1090$ dpkg-buildpackage -b
dpkg-buildpackage: source package dump1090-mutability
dpkg-buildpackage: source version 1.15~dev
dpkg-buildpackage: source distribution UNRELEASED
dpkg-buildpackage: source changed by Oliver Jowett <oliver@mutability.co.uk>
sh: 1: gcc: not found
dpkg-architecture: warning: couldn't determine gcc system type, falling back to default (native compilation)
dpkg-buildpackage: host architecture armhf
 dpkg-source --before-build dump1090
dpkg-checkbuilddeps: Unmet build dependencies: build-essential:native
dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
dpkg-buildpackage: warning: (Use -d flag to override.)




pi@OrangePI:~/git/dump1090$ dpkg-buildpackage -d
dpkg-buildpackage: source package dump1090-mutability
dpkg-buildpackage: source version 1.15~dev
dpkg-buildpackage: source distribution UNRELEASED
dpkg-buildpackage: source changed by Oliver Jowett <oliver@mutability.co.uk>
sh: 1: gcc: not found
dpkg-architecture: warning: couldn't determine gcc system type, falling back to default (native compilation)
dpkg-buildpackage: host architecture armhf
 dpkg-source --before-build dump1090
 fakeroot debian/rules clean
dh clean
sh: 1: gcc: not found
dpkg-architecture: warning: couldn't determine gcc system type, falling back to default (native compilation)
   dh_testdir
   dh_auto_clean
sh: 1: gcc: not found
dpkg-architecture: warning: couldn't determine gcc system type, falling back to default (native compilation)
        make -j1 clean
make[1]: Entering directory '/home/pi/git/dump1090'
rm -f *.o compat/clock_gettime/*.o compat/clock_nanosleep/*.o dump1090 view1090 faup1090 cprtests crctests
make[1]: Leaving directory '/home/pi/git/dump1090'
   dh_clean
        rm -f debian/dump1090-mutability.substvars
        rm -f debian/dump1090-mutability.*.debhelper
        rm -rf debian/dump1090-mutability/
        rm -f debian/*.debhelper.log
        rm -f debian/files
        find .  \( \( \
                \( -path .\*/.git -o -path .\*/.svn -o -path .\*/.bzr -o -path .\*/.hg -o -path .\*/CVS \) -prune -o -type f -a \
                \( -name '#*#' -o -name '.*~' -o -name '*~' -o -name DEADJOE \
                 -o -name '*.orig' -o -name '*.rej' -o -name '*.bak' \
                 -o -name '.*.orig' -o -name .*.rej -o -name '.SUMS' \
                 -o -name TAGS -o \( -path '*/.deps/*' -a -name '*.P' \) \
                \) -exec rm -f {} + \) -o \
                \( -type d -a -name autom4te.cache -prune -exec rm -rf {} + \) \)
        rm -f *-stamp
 dpkg-source -b dump1090
dpkg-source: info: using source format `3.0 (native)'
dpkg-source: info: building dump1090-mutability in dump1090-mutability_1.15~dev.tar.xz
dpkg-source: info: building dump1090-mutability in dump1090-mutability_1.15~dev.dsc
 debian/rules build
dh build
sh: 1: gcc: not found
dpkg-architecture: warning: couldn't determine gcc system type, falling back to default (native compilation)
   dh_testdir
   dh_auto_configure
sh: 1: gcc: not found
dpkg-architecture: warning: couldn't determine gcc system type, falling back to default (native compilation)
   debian/rules override_dh_auto_build
make[1]: Entering directory '/home/pi/git/dump1090'
dh_auto_build -- 'EXTRACFLAGS=-DHTMLPATH=\"/usr/share/dump1090-mutability/html\" -DMODES_DUMP1090_VARIANT=\"dump1090-mutability\"'
sh: 1: gcc: not found
dpkg-architecture: warning: couldn't determine gcc system type, falling back to default (native compilation)
        make -j1 "EXTRACFLAGS=-DHTMLPATH=\\\"/usr/share/dump1090-mutability/html\\\" -DMODES_DUMP1090_VARIANT=\\\"dump1090-mutability\\\""
make[2]: Entering directory '/home/pi/git/dump1090'
gcc -D_FORTIFY_SOURCE=2 -DMODES_DUMP1090_VERSION=\"v1.15~dev\" -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -O2 -g -Wall -Werror -W `pkg-config --cflags librtlsdr` -DHTMLPATH=\"/usr/share/dump1090-mutability/html\" -DMODES_DUMP1090_VARIANT=\"dump1090-mutability\" -c dump1090.c -o dump1090.o
/bin/sh: 1: gcc: not found
Makefile:37: recipe for target 'dump1090.o' failed
make[2]: *** [dump1090.o] Error 127
make[2]: Leaving directory '/home/pi/git/dump1090'
dh_auto_build: make -j1 EXTRACFLAGS=-DHTMLPATH=\"/usr/share/dump1090-mutability/html\" -DMODES_DUMP1090_VARIANT=\"dump1090-mutability\" returned exit code 2
debian/rules:21: recipe for target 'override_dh_auto_build' failed
make[1]: *** [override_dh_auto_build] Error 2
make[1]: Leaving directory '/home/pi/git/dump1090'
debian/rules:30: recipe for target 'build' failed
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
pi@OrangePI:~/git/dump1090$


FAILED…
.

Yup. Failed for me running these commands.


wget https://github.com/mutability/librtlsdr/releases/download/v0.5.4_git-1/librtlsdr0_0.5.4.git-1_armhf.deb
wget https://github.com/mutability/librtlsdr/releases/download/v0.5.4_git-1/librtlsdr-dev_0.5.4.git-1_armhf.deb
sudo dpkg -i librtlsdr0_0.5.4.git-1_armhf.deb
sudo dpkg -i librtlsdr-dev_0.5.4.git-1_armhf.deb
sudo apt-get install git-core
mkdir git
cd git
git clone https://github.com/mutability/dump1090.git
sudo apt-get install librtlsdr-dev libusb-1.0-0-dev pkg-config debhelper
cd dump1090
dpkg-buildpackage -b "Had to do sudo dpkg-buildpackage -d" But failed after some installing
sudo dpkg -i dump1090-mutability_1.15~dev_armhf.deb

If the pain gets too great :wink: I know this works with debian_jessie_mini + uImage_OPI-2 and “script.bin.OPI-PC_1080p50_hdmi”,(you may need the 60hz version) from scriptbin_kernel.tar.gz. I did a successful build a couple of days ago.

EDIT Added for completeness.(
First login as “orangepi” with password “orangepi” and expand the file system as per the prompt, edit the hosts file (line 1).
Then cerate the “pi” user(line 2) follow the prompt for password etc, (just ignore and hit enter through the name and phone number stuff) then add " pi" to the sudo users group (line 3).
Then “sudo reboot” and log back in as “pi” with whatever password you chose and follow the recipe from line 5. )



sudo nano /etc/hosts   #( add orangepi to the localhost line)   ###EDIT####
sudo adduser pi
sudo adduser pi sudo
sudo reboot
apt-get update
sudo apt-get install ca-certificates
sudo apt-get install cron
wget https://github.com/mutability/librtlsdr/releases/download/v0.5.4_git-1/librtlsdr0_0.5.4.git-1_armhf.deb
wget https://github.com/mutability/librtlsdr/releases/download/v0.5.4_git-1/librtlsdr-dev_0.5.4.git-1_armhf.deb
sudo dpkg -i librtlsdr0_0.5.4.git-1_armhf.deb
sudo dpkg -i librtlsdr-dev_0.5.4.git-1_armhf.deb
apt-get update
sudo apt-get install git-core
mkdir git
cd git
git clone https://github.com/mutability/dump1090.git
sudo apt-get install librtlsdr-dev libusb-1.0-0-dev pkg-config debhelper
cd dump1090
dpkg-buildpackage -b

cd ..
sudo dpkg -i dump1090-mutability_1.15~dev_armhf.deb

sudo apt-get install lighttpd   
sudo lighty-enable-mod dump1090
sudo service lighttpd force-reload
sudo nano /etc/lighttpd/lighttpd.conf      "set server.document-root =/var/www"

sudo apt-get install rrdtool && sudo apt-get install collectd
wget http://raspi.ayadex.com/volatile/web_install.sh
sudo chmod +x web_install.sh
sudo ./web_install.sh "dump-tools"
cd ~/pi/dump-tools
sudo ./install.sh "crontab"



@ieand

Thanks.
(1) You issued these commands as user “root” or “orangepi” or “pi”?
(2) the very first command “sudo nano /etc/localhost” opens a new blank file.
“#( add orangepi to the localhost line)” can you explain this how to do this.

#abcd567
oops,
That line should read “sudo nano /etc/hosts”, must have been more hungover than i thought this morning.
The contents of my hosts file are:



127.0.0.1       localhost orangepi
::1             localhost ip6-localhost ip6-loopback
ff02::1         ip6-allnodes
ff02::2         ip6-allrouters


For completeness.
First login as “orangepi” with password “orangepi” and expand the file system as per the prompt, edit the hosts file as above.
Then cerate the “pi” user(line 2) follow the prompt for password etc, (just ignore and hit enter through the name and phone number stuff) and add " pi" to the sudo users group (line 3).
Then “sudo reboot” and log back in as “pi” with whatever password you chose

I virtually never login as root, its much safer to use the sudo command when you need root permissions’

Hope that helps

@ieand:
Thanks a lot.
All graphs are showing now.
It seems debian_jessie_mini is solution for ads-b with opi-pc.

@jepolch:
You have complained that your wifi dongle does not work with opi pc / debian_jessie_mini.
I read somewhere in opi forums (cant find the page now) that this wifi dongle worked for the writer of the post:

Mini USB 150M 150Mbps Wireless LAN Adapter 802.11b/n/g WiFi w/ 2dBi Antenna UL
ebay.com/itm/161880385181

$2.97+ free shipping from Hong Kong :slight_smile:.
I will order one, for $3 it is worth trying… success or headaches then dongle >> trash can

UPDATE on Raspbian_For_OrangePi_PC_v0_8_0

ADD USER “pi” and “orangepi”

Login as default user “root” (the only avaiable option by default)



root@orangepi:~# sudo adduser --ingroup pi pi
#you will be prompted to set a pass word for user "pi".
#you will also be asked to give name, address email etc of user "pi". 
#simply press Enter key to skip to next step.
root@orangepi:~# sudo adduser pi sudo
root@orangepi:~# sudo reboot


At reboot, if you try to login as “pi” or “orangepi”, the terminal will instantly close.
Login as default user “root”.
After login as “root”, enter following commands:



root@orangepi:~# echo 32768 > /proc/sys/vm/mmap_min_addr
root@orangepi:~# echo "vm.mmap_min_addr = 32768" >  /etc/sysctl.d/mmap_min_addr.conf
root@orangepi:~# sudo reboot


At this reboot, you can login as “pi” (using password set by you) or as user “orangepi” using password “orangepi”, or as default user “root” using password “orangepi” (or the password you have changed).
Hopefully you will succeed.
Note:
(1) If value 32768 in commands above does not work, try using value 4096
(2) After reboot, check the above number is saved by following command"



cat  /proc/sys/vm/mmap_min_addr


Nice…

This command should change the time zone.


sudo dpkg-reconfigure tzdata

After adding user “pi” as in my last post above, I logged-in as user “pi” and successfully installed dump1090-mutability v1.15~dev, rrd tools, and collectd. All graphs are showing now.

Did you install jprochazka github.com/jprochazka/adsb-feeder graphs? Using this?

No, I used mgunther’s method for dump1090-mutability v1-15~dev, and Xforce’s web-install script for rrd tools + collectd.

ok…

New Adventure: Installed Ubuntu Vivid Mate

(1) Downloaded “OrangePI-PC_Ubuntu_Vivid_Mate.img” from here: http://www.orangepi.org/orangepibbsen/forum.php?mod=viewthread&tid=342 .
(2) Formatted once again the (poor) microSD card & burned above image.
(3) Inserted microSD card in OPi PC, connected HDMI to TV, connected keyboard, mouse & DVB-T dongle to OPi, and powered up.
(4) Logged in as default user “root”, password “orangepi”.
(5) Opened terminal, expanded file system, added user “pi”, and then added user “pi” to sudo group.

(6) rebooted and this time logged in as user “pi”.

(7) Built, installed and configured dump1090-mutability v1,15~dev using mgunther’s method at http://discussions.flightaware.com/post177419.html#p177419 .
(8) Checked in the web browser “localhost/dump1090/gmp.html”, found it very lively with colored planes flying around :smiley:

(9) Installed “rrdtools” & installed “collectd”
(10) Ran XForce’s web-install script to install graphs as shown here: http://discussions.flightaware.com/post166865.html#p166865
(11) Checked in browser “localhost/collectd” no graphs :frowning:. edited /etc/lighttpd/lighttpd.conf and changed server.document-root = “/var/www/html” to server.document-root = “/var/www” all graphs started displaying :smiley:

(12) Installed Piaware data feeder, Planefinder data feeder, and Flightradar24 data feeder without any problems :smiley:

The Ubuntu Vivid Mate on my Orange Pi PC, displayed on TV via HDMI

… Next Adventure: Will format (poor) microSD card once again, burn OS openElec with embedded kodi/xbmc media center, and enjoy.

.

UPDATE 1 - “UBUNTU_VIVID_MATE”: Tried Instalation of adsb software by jprochazka’s script. Installation was successful, but piaware will not connect to Flightaware server, CA certificate problem. Installed Piaware using method given in Flightaware web page http://flightaware.com/adsb/piaware/install, and Piaware started working OK

See details here: http://discussions.flightaware.com/post185817.html#p185817.

UPDATE 2 - “DEBIAN JESSIE Xfce”: dump1090 will not build properly using mgunther or jprochazka’s methods.
Used following method, and it worked and dump1090-mutability is now up & running :slight_smile:

First tried apt-get install, but failed



pi@OrangePI:~ $ sudo apt-get install dump1090-mutability
E: Package 'dump1090-mutability' has no installation candidate


Set up the repository



pi@OrangePI:~ $ wget https://github.com/mutability/mutability-repo/releases/download/v0.1.0/mutability-repo_0.1.0_armhf.deb
pi@OrangePI:~ $ sudo dpkg -i mutability-repo_0.1.0_armhf.deb


Then installed via apt-get as below:



#Install dump1090-mutability
pi@OrangePI:~ $ sudo apt-get update && sudo apt-get install dump1090-mutability

# carryout detailed configuration:
pi@OrangePI:~ $ sudo dpkg-reconfigure dump1090-mutability 

#Install lighttpd web server
pi@OrangePI:~ $ sudo apt-get install lighttpd
pi@OrangePI:~ $ sudo lighty-enable-mod dump1090

#reboot for changes to take effect
pi@OrangePI:~ $ sudo reboot


abcd567,

If you run this command what kernel are you on? On the Orange Pi.


hostnamectl

Thanks.

When I do it I get this.

Operating System: Debian GNU/Linux 8 (jessie)
Kernel: Linux 3.4.39

OrangePi-PC Jesssie-mini missing logrotate??

I have dump1090-mutability version 1.14 running on two OrangePi-PCs as well as on a Raspberry Pi and a Beaglebone Black. The Opis are both running Debian Jessie(mini) and the Rpi and the BBB are running Debian Wheezy.

I just noticed in /var/log/ that the dump1090-mutability.log file on one Opi has grown to over 8 gigabytes and on the other Opi (a more recent installation) has grown to over 1.8 gigabytes, while on the Rpi and BBB, there is a rotation of four small files.

On the Opis, the log is obviously not rotating. Digging further, it appears that either I missed installing it or logrotate is not part of the standard Jessie-mini build for the OrangePi-PC.

The solution was simple, install logrotate using


sudo apt-get install logrotate

after which one can force the rotate to run using


sudo logrotate -f /etc/logrotate.d/dump1090-mutability

For anyone else that’s been runnning Jessie-mini on an Opi for a while, I’d be curious if your log file is growing or rotating as it should. If not rotating, is this something that may need to be included in various install scripts for Opis, or did I completely miss it?
Thanks

@yxespotter I had a OPI PC running jessie_mini for slightly over 2 months before the SD card started playing up. Just checked the backups and the dump1090 mutability v1.15 log is 3.6mb and contains data between the 11th November and the 15th December
No idea why your log would be so much bigger, maybe v1.15 is diferent.

Logrotate isn’t installed on my current build so it probably wasn’t on that previous one either. Thanks for the heads up though, it should be installed.

Re huge log sizes, this can happen if the system clock jumps forward during boot (e.g. fake-hwclock doesn’t have a recent value, then ntp fixes it) while dump1090 is running, dump1090 will spam stats results as it “catches up”.

It is fixed by this commit a couple of weeks ago: github.com/mutability/dump1090/ … cd1f401cfb

fake-hwclock is another package that isn’t installed by default on most of the OPi loboris images…