Automated Installation of AcarSDeco2 on RPi

ab cd

Senior Member
AUTOMATED INSTALL ON RPi 2/3/4 Raspbian Stretch / Buster

(1) Easy Installation - Just copy-paste one command to run bash script and it does everything.

(2) Automatic start - systemd service automatically starts it at boot/reboot.

(3) Easy monitoring & control - Provides commands systemctl status, systemctl stop, systemctl start, and systemctl restart.

(4) Easy configuration - Provides a separate config file in simple format, each config item on a separate line, starting with --

(5) Blacklisting of rtl-sdr - The installation script creates a blacklist file /etc/modprobe.d/blacklist-rtl-sdr.conf with required blacklist entries, preventing error: failed to connect/open rtl-sdr device.


FOR DETAILED INSTRUCTIONS:
https://github.com/abcd567a/ad2/blob/master/README.md



.

Running ModeSDeco2 AND AcarSDeco2 on Same Pi
If you want, AcarSDeco2 and ModeSDeco2 (Click here) can be installed on the same RPi, provided:

(1) Two DVB-T dongles are plugged into RPi, one for ModeSDeco2, other for AcarSDeco2.

(2) The two dongles are serialized so that each software use its respective dongle+antenna. The dongles can be serialized, say 00000101 & 00000102. In addition, following to be added in config of the two softwares

ModeSDeco2 config:
--device-serial 00000101

AcarSDeco2 config:
--device-serial 00000102

How to serialize dongles

Code:
## Install necessary tool
sudo apt update
sudo apt install rtl-sdr

## Stop all programs which use the dongle
sudo systemctl stop md2 ad2

## Issue following commands one by one.
## Each command will ask [y/n], type y for yes.

rtl_eeprom -s 00000101 -d 0

rtl_eeprom -s 00000102 -d 1

## Un-plug, then re-plug both dongles

## Check that dongles have been correctly serialized
rtl_test -t

## Reboot Pi to restore it to normal
sudo reboot
 
Last edited:

AnirbanSen

Member
Access at Port 8686 - Site cannot be reached.

pi@SenPi0:~ $ sudo systemctl status ad2
● ad2.service - AcarSDeco2
Loaded: loaded (/lib/systemd/system/ad2.service; enabled; vendor preset: enab
Active: activating (auto-restart) (Result: exit-code) since Fri 2019-09-06 15
Process: 2498 ExecStart=/bin/bash /usr/share/ad2/ad2-start.sh (code=exited, st
Main PID: 2498 (code=exited, status=132)

Sep 06 15:16:41 SenPi0 systemd[1]: ad2.service: Unit entered failed state.
Sep 06 15:16:41 SenPi0 systemd[1]: ad2.service: Failed with result 'exit-code'.
lines 1-8/8 (END)
 
Last edited:

wiedehopf

New Member
Each program using an SDR needs the SDR to itself. It can't be shared.
In this case you can't add a 2nd dongle either, it probably doesn't have an argument to select the dongle by serial number.
 

wiedehopf

New Member
It'll be automatically restarted by piaware for example.

systemctl status is not very useful

this would be much more useful to see:
sudo journalctl --no-pager -u ad2
 

wiedehopf

New Member
It's not gonna work on the RPiZero, it's not compiled for it seems (Illegal instruction).

Needs a different Pi.
 

ab cd

Senior Member
In this case you can't add a 2nd dongle either, it probably doesn't have an argument to select the dongle by serial number.
It does have an argument to share dongles.

--device-serial 00000101


To serialize dongles
(1) Plug in both dongles in RPi
(2) Give following commands. Last two commads will ask [y/n]. Say y
(3) Install rtl-sdr package
Code:
sudo apt update
sudo apt install rtl-sdr
(4) Stop all apps which use dongle
Code:
sudo systemctl stop piaware fr24feed dump1090-mutability dump1090-fa ad2
(5) Serialize dongles
Code:
rtl_eeprom -s 00000101 -d 0
rtl_eeprom -s 00000102 -d 1
(6) Unplug, then replug both dongles.

(7) Run following command to check if dongles are serialized correctly (i.e. 00000101 & 00000102)

Code:
rtl_test -t
(8) In config files of dump1090 and acarsdeco2 specify respective serial numbers (00000101 & 00000102)
 
Last edited:

AnirbanSen

Member
I'm kind of stuck with Pi0s for the time being.
Perhaps the next project.

Question: If a SD card has been used to set up the Pi0, can it be moved to a Pi3/Pi4 and work or it configurates itself to the processor it first boots to?
 
Top