anything
AirNav RadarBox
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 


Author Topic: Automated Installation of ModeSMixer2, ModeSDeco2, and AcarSDeco2 on RPi  (Read 3302 times)

0 Members and 1 Guest are viewing this topic.

abcd567

  • Sr. Member
  • ****
  • Posts: 447
  • CYYZ - Toronto
(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.

FOR DETAILED INSTRUCTIONS:

ModeSMixer2:
Does NOT require a dvbt dongle.
Gets data from an existing source such as dump1090.
https://github.com/abcd567a/mm2/blob/master/README.md

ModeSDeco2:
Requires a dedicated dvbt dongle.
https://github.com/abcd567a/md2/blob/master/README.md

AcarSDeco2:
Requires a dedicated dvbt dongle.
https://github.com/abcd567a/ad2/blob/master/README.md


http://xdeco.org]


UNINSTALLATION

Completely uninstall by following 4 commands:

ModeSMixer2
Code: [Select]
sudo systemctl stop mm2
sudo systemctl disable mm2
sudo rm /lib/systemd/system/mm2.service
sudo rm -rf /usr/share/mm2


ModeSDeco2
Code: [Select]
sudo systemctl stop md2
sudo systemctl disable md2
sudo rm /lib/systemd/system/md2.service
sudo rm -rf /usr/share/md2



AcarSDeco2
Code: [Select]
sudo systemctl stop ad2
sudo systemctl disable ad2
sudo rm /lib/systemd/system/ad2.service
sudo rm -rf /usr/share/ad2

« Last Edit: September 20, 2019, 12:07:06 AM by abcd567 »

abcd567

  • Sr. Member
  • ****
  • Posts: 447
  • CYYZ - Toronto
Running ModeSDeco2 AND AcarSDeco2 on Same Pi

If you want, ModeSDeco2 and AcarSDeco2 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

(1) Prepration
Code: [Select]
## Install necessary tool
sudo apt update
sudo apt install rtl-sdr

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

(2) Serialize Dongle for ModeSDeco2
Code: [Select]
## Plug the dvbt dongle you want to use for ModeSDeco2 (UNPLUG ALL OTHER Dongles)
## Issue following command.
## The command will ask [y/n], type y for yes.

rtl_eeprom -s 00000101

## Un-plug the dvb-t dongle

(3) Serialize Dongle for AcarSDeco2
Code: [Select]
## Plug the dvbt dongle you want to use for AcarSDeco2 (UNPLUG ALL OTHER Dongles)
## Issue following command.
## The command will ask [y/n], type y for yes.

rtl_eeprom -s 00000102

## Un-plug the dvb-t dongle

(4) Now re-plug both dongles

(5) Check that dongles have been correctly serialized
Code: [Select]
rtl_test -t

(6) Reboot Pi to restore it to normal
Code: [Select]
sudo reboot
« Last Edit: September 20, 2019, 12:05:30 AM by abcd567 »

saihoufung

  • New Member
  • *
  • Posts: 6
Great info.

Is the map still the google map or other openstreet map / others?

Willing to try on it...

Regards.

abcd567

  • Sr. Member
  • ****
  • Posts: 447
  • CYYZ - Toronto
Is the map still the google map or other openstreet map / others?

Unfortunately not yet.

Inspite of request by me and many other users, the author of these software (Sergsero) has not yet provided any other map like open street.

Hope he will do it if more users request him.
« Last Edit: August 29, 2019, 09:19:18 PM by abcd567 »

abcd567

  • Sr. Member
  • ****
  • Posts: 447
  • CYYZ - Toronto

Willing to try on it...


No harm. You can try, and if dont like, can completely uninstall by commands given in 2nd post of this thread.

https://www.airnavsystems.com/forum/index.php?topic=102321.msg413761#msg413761

saihoufung

  • New Member
  • *
  • Posts: 6

Willing to try on it...


No harm. You can try, and if dont like, can completely uninstall by commands given in 2nd post of this thread.

https://www.airnavsystems.com/forum/index.php?topic=102321.msg413761#msg413761

Thanks for the info.

Code: [Select]
[email protected]:~# sudo systemctl status md2
* md2.service - ModeSDeco2
   Loaded: loaded (/lib/systemd/system/md2.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Thu 2019-08-29 22:51:22 UTC; 8s ago
  Process: 2327 ExecStart=/bin/bash /usr/share/md2/md2-start.sh (code=exited, status=127)
 Main PID: 2327 (code=exited, status=127)


Cheers.
« Last Edit: August 29, 2019, 10:53:55 PM by saihoufung »

abcd567

  • Sr. Member
  • ****
  • Posts: 447
  • CYYZ - Toronto
@Saihaufung:

Exit code 127 is command not found, and most likely it is permission issue, or a missing file.

Please post output of following command. It will list all files in folder md2 alogwith their permissions:
Code: [Select]
ls -l /usr/share/md2/

(1) The folder md2 should contain a file named md2-start.sh, and it should be executable.

(2) The folder md2 should also contain an executeable binary file modesdeco2

NOTE:
The script installs modesdeco2 version which is compatible to Raspberry Pi models 2 & 3 with debian based os

modesdeco2_rpi2-3_deb9_20180729.tgz

From your post it seems you are installing it on another board or another os "nanopi". The failure may be due to this.
« Last Edit: August 30, 2019, 02:41:56 AM by abcd567 »

saihoufung

  • New Member
  • *
  • Posts: 6
@Saihaufung:

Exit code 127 is command not found, and most likely it is permission issue, or a missing file.

Please post output of following command. It will list all files in folder md2 alogwith their permissions:
Code: [Select]
ls -l /usr/share/md2/

(1) The folder md2 should contain a file named md2-start.sh, and it should be executable.

(2) The folder md2 should also contain an executeable binary file modesdeco2

NOTE:
The script installs modesdeco2 version which is compatible to Raspberry Pi models 2 & 3 with debian based os

modesdeco2_rpi2-3_deb9_20180729.tgz

From your post it seems you are installing it on another board or another os "nanopi". The failure may be due to this.

Hi @abcd567

Thanks for the info.

I almost forgot about the Pi which you post is for RPi and not for other SBC / NanoPi K2 (S905).

Will have a try on RPi later.

Best Regards.

abcd567

  • Sr. Member
  • ****
  • Posts: 447
  • CYYZ - Toronto
Re: Automated Installation of ModeSMixer2, ModeSDeco2, and AcarSDeco2 on RPi
« Reply #8 on: February 26, 2021, 03:01:14 AM »
Installation guide and installation scripts for modesmixer2 at Github

For various devices (Pi & PC), and various OS (Raspberry Pi 32-bit & 64-bit OS, Ubuntu20 x86_64, Debian10 x86_64, Kali Linux 2020 amd64, Arch Linux 2021 x86_64) are located:


https://github.com/abcd567a/mm2

Updated on 23-02-2021

Change log:
(1) The modesmixer2 is now run by user mm2 (previously it was run by user root).

(2) The max range curve data file distances.json is created and owned by user mm2 and is located in folder /usr/share/mm2 (previously it was created and owned by user root and was located in root partition /distances.json )

(3) The max range plot is persistant and survives restarts and reboots. To clear the curve and start fresh plotting, do following:
Code: [Select]
#You must stop mm2 before deleting the file distances.json. sudo systemctl stop mm2

# Delete file distances.json

sudo rm /distances.json #(For installations done BEFORE 23rd February 2021)

sudo rm /usr/share/mm2/distances.json  #(For installations done ON or AFTER 23rd February 2021)

# Restar modesmixer2
sudo systemctl restart mm2


Aerotower

  • Hero Member
  • *****
  • Posts: 510
Hi abcd567,

I have install your script for ModeSmixer2.
Now I'm trying to insert in the mm2: basestation, logos, shilhouettes using this command lines on mm2.config but without success.

--frdb /usr/share/mm2/flightroute.sqb
--silhouettes /usr/share/mm2/silhouettes/
--pictures /usr/share/mm2/logos/
--dbro /usr/share/mm2/basestation.sqb

if I change --dbro to --db the mm2 don't work.

Thanks.

Best regards,
Manuel

abcd567

  • Sr. Member
  • ****
  • Posts: 447
  • CYYZ - Toronto
I have install your script for ModeSmixer2.
Now I'm trying to insert in the mm2: basestation, logos, shilhouettes using this command lines on mm2.config but without success.

--frdb /usr/share/mm2/flightroute.sqb
--silhouettes /usr/share/mm2/silhouettes/
--pictures /usr/share/mm2/logos/
--dbro /usr/share/mm2/basestation.sqb

if I change --dbro to --db the mm2 don't work.


The modeSMixer2 installed by my scripts after changes on 23.02.2021 are run by user mm2, and the ownership of folder /usr/share/mm2 and all files inside it (at time of installation) is assigned to user mm2 to enable modesmixer2 started by user mm2 to use these file.

Files and folders added later in this folder wont be owned by user mm2. Hence the modesmixer2 started by user mm2 wont be able to access and use these files.

After adding new files. You have to issue following command to give ownership of new files & folders to user mm2:

Code: [Select]
sudo chown mm2:mm2 -R /usr/share/mm2 

sudo systemctl restart mm2 


After above commands, the modesmixer2 will start using the db you have added.

You can check ownership of files by following command. This command will list all files in folder /usr/share/mm2 and any sub folders inside it. It will list one file per line. Each line will have either mm2 mm2 (owner mm2) or root root (owner root)

Code: [Select]
ls -l /usr/share/mm2   


.
« Last Edit: March 23, 2021, 01:23:35 AM by abcd567 »

Aerotower

  • Hero Member
  • *****
  • Posts: 510
Hi abcd567,

I have done all of that but still have some issues.

I use logos and shilhouettes from my radarbox v6 software, but for some reason not all silhouettes are showed.
And don´t have any logos.

Thanks.

abcd567

  • Sr. Member
  • ****
  • Posts: 447
  • CYYZ - Toronto

Runway 31

  • Moderator
  • Hero Member
  • *****
  • Posts: 30359
Are the ones used by Radarbox the correct format for the other program.  What format does it expect bmp, jpeg?

Alan

abcd567

  • Sr. Member
  • ****
  • Posts: 447
  • CYYZ - Toronto
With ModeSMixer2, I use BaseStation.sqb copied from VRS, and Silhouettes and Operator Flags from the Radarspotting.com, link to which I have provided in my above post.

Format I think is bmp


.
« Last Edit: March 23, 2021, 11:59:29 AM by abcd567 »