Radarspotting

Mode-S Software => ModeSMixer & ModeSDeco => Topic started by: IanH on February 21, 2015, 11:20:55 AM

Title: Installing ModeSDeco2 on a Raspberry Pi
Post by: IanH on February 21, 2015, 11:20:55 AM
There is now a quicker method to get ModesDeco2 running on a Raspberry Pi if you haven't already installed dump1090. See Post #5 for details.

You may want to check this post for some tips that are applicable to the new post  ;)

Started a separate thread to avoid mixing up with thread on development. Hope it helps.

I wanted to try ModeSDeco2 on a Pi but couldn't find the instructions. I'm sure they were here on the forum at some time. Anyway just running "modesdeco2" gives an "sdr" error. That made me realise what I needed to install.

Essentially we need the sdr libraries used by other ModeS software on Linux.

Assuming you have the Pi set up with Raspian and can connect to it remotely via Putty, follow David Taylor's instructions from item #5 for "Preparing the Raspberry Pi" at http://www.satsignal.eu/raspberry-pi/dump1090.html.

This was written to get dump1090 working but also valid for ModeSDeco2.

It is up to you whether you want to calibrate the dongle (I never have) but stop at the instruction that says "Now download the latest release dump1090 application source code."

Tips:

The system is now ready to install and run Modesdeco2.

I use WinSCP to copy files to and from the Pi: http://winscp.net/eng/index.php. You get a drag and drop file manager interface.

Copy the version of modesdeco2 for your version of the Pi from the PC to the Pi.
In PUTTY type lsYou should see your modesdeco2_rpi_yyyymmdd.tgz file in red text. Select it with the mouse (run the mouse cursor over the filename to hightlight it, type  tar -xvf at the command line and then right click to copy the filename tar -xvf modesdeco2_rpi_yyyymmdd.tgz Hit return and the tgz file will be uncompressed.

Do a directory listing (type "ls") and you should see modesdeco2 in green text (means it is executable). Just typing "modesdeco2" won't work - you will need to type ./modesdeco2

Add the command line option you require.

You can avoid retyping long command lines by using the up and down arrows to fetch
previous commands  ;D.

This has installed modesdeco2 in the /home/pi directory.

Additional tips:



Edit: Comments and improvements welcome!

Not least how do you keep it running when PUTTY is closed? Tried "&" but not successful  :(
Title: Re: Installing ModeSDeco2 on a Raspberry Pi
Post by: Triple7 on February 21, 2015, 12:04:45 PM
Ian,

Thanks for these instructions. I will try this out later today. I have already got Dump1090 working but have set it to start automatically, so I'll need to change that bit so I can test ModeSDeco2.

If I find any oddities, I'll post here to keep it all in one place.

Tim
Title: Re: Installing ModeSDeco2 on a Raspberry Pi
Post by: sergsero on February 21, 2015, 12:53:47 PM
Ian,

thank you very much for this thread.

Small additions.
Starting with version 20150214 for running modesdeco2 only required two files: libusb1.0-0 and wmm.cof. Driver rtlsdr from  osmocom.org no longer required as within in program implemented internal modes setting of dongle.
However, on a newly installed system, you may experience difficulty with access rights to the dongle due to the lack of records udev, but that is another story.

If have difficulties, how to run programs xDeco, I'll try to do .deb packages additionally.

However, there are other ways of startup programs and monitoring their work, for example, supervisord. I will try to tell about them too.

Thanks,
sergsero
Title: Re: Installing ModeSDeco2 on a Raspberry Pi
Post by: IanH on February 21, 2015, 01:03:05 PM
Sergsero

I tried with just those minimal files but that is when I got the "sdr_fail" error or some similar error.

So it may just have been access problem! No need for all this extra install  :'(

Right need to try again  ;D

I like your programs and just trying to allow more people to use them on a Pi as easily as possible.

Ian

Title: Re: Installing ModeSDeco2 on a Raspberry Pi
Post by: Triple7 on February 21, 2015, 03:29:44 PM
Hi Ian,

I followed your instructions and noted one very minor error. In your line showing type "tar -xvf" you need to add a space at the end before copying modesdeco2_rpi_yyyymmdd.tgz so the line looks like this -> tar -xvf modesdeco2_rpi_yyyymmdd.tgz.

Having already gone through the set-up for Dump1090, all I did was copy the .tgz file to the RPi and extract it, ModeSDeco worked straight away after that when I entered the correct parameters.

When I had gain set to auto (i.e. no --gain entry) I got a very poor range but with it set to 48 it's giving me about 50 miles, which considering I am on a ground floor with the ModeS antenna just stuck outside the window on a north facing wall isn't at all bad. Changing to 49.6 which is the maximum didn't seem to make any appreciable difference. What sort of gain should I be using? Is there a way to determine a correct value using a Linux utility or is that best done with a Windows package - which one?

Hi Sergsero,

Thanks for this program. It looks great using the web interface and I have registrations and silhouettes showing - would there be a chance to also display the operator logos in a separate column at some point in the future. Using the OperatorFlagCode field from the sqb file.

Tim
Title: Re: Installing ModeSDeco2 on a Raspberry Pi
Post by: IanH on February 21, 2015, 04:59:27 PM
Thanks to Sergsero's information, there is a much easier way to install now.

I'll leave my original post for the moment but will probably modify it for people like Tim who already have dump1090 installed and hence just need to untar the modesdeco.tgz file.


So new quick method:

Copy modesdeco2_rpi_yyyymmdd.tgz from PC to Pi using WinSCP.

Uncompress using the following code at the Pi command line:tar -xvf modesdeco2_rpi_yyyymmdd.tgz

I used the command sudo apt-get install libusb-1.0-0-dev to install a version of libusb-1.0

Next you need to create two text files: one to allow user "pi" to access the dongle and one to remove the built-in driver for the dongle.

Source for the info is http://forum.flightradar24.com/printthread.php?t=6133&pp=40&page=24 and http://www.satsignal.eu/raspberry-pi/dump1090.html

First run the command lsusb and look at the attached picture.

For the DVB-T dongle, two sets of numbers/letters are important - in my case "0bda:2838"

Now run the text editor sudo nano /etc/udev/rules.d/rtl-sdr.rules and copy the following SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2838", MODE:="0666" modifying the two items 0bda and 2838 to match your dongle.

Use Ctrl-O to save and Ctrl-X to exit.

To remove the built-in drivers is similar sudo nano /etc/modprobe.d/no-rtl.conf Add the lines blacklist dvb_usb_rtl28xxu
blacklist rtl2832
blacklist rtl2830
Save and exit.

Reboot the pi and the command ./modesdeco2 (in the correct directory) should run it without any errors.

Use Ctrl-C to stop it and then add the options you want (gain, database, etc)

[Attachment deleted by Admin to save file space]
Title: Re: Installing ModeSDeco2 on a Raspberry Pi
Post by: Triple7 on February 23, 2015, 06:46:51 PM
I've been running ModeSDeco2 on my (headless) RPi2 for a reasonable time now, attached is a screen grab from my PC taking the --web feed showing the stats. One thing that puzzles me is that I have not received any Mode A/C messages (top right in screen grab) - is that right? Have I missed a setting somewhere?

Thanks,

Tim

[Attachment deleted by Admin to save file space]
Title: Re: Installing ModeSDeco2 on a Raspberry Pi
Post by: IanH on February 23, 2015, 10:17:12 PM
You need to add --rbs into the command line to get Mode A/C
Title: Re: Installing ModeSDeco2 on a Raspberry Pi
Post by: Triple7 on February 24, 2015, 07:18:54 AM
Thanks Ian, I missed that switch  ::)

Tim
Title: Re: Installing ModeSDeco2 on a Raspberry Pi
Post by: IanH on February 24, 2015, 09:20:24 AM
I only found it on Sunday when I was searching through examples and wondered what it did  ;)
Title: Re: Installing ModeSDeco2 on a Raspberry Pi
Post by: Radio2.0 on October 15, 2015, 08:20:48 PM
Is there any benefit for an Pi instead of the Pc Version?
My Server run 24/7 so...
Title: Re: Installing ModeSDeco2 on a Raspberry Pi
Post by: davidtriggs on April 13, 2018, 01:40:07 AM
Has anyone installed modesdeco on a raspberry pi 3? I am new to using pi and have found the following error

./modesdeco2: error while loading shared libraries: libssl.so.1.0.0: cannot open shared object file: No such file or directory

On  the pi 3 the libssl version is 1.0.2, does anyone have a solution to using an old library?

Thanks

David
Title: Re: Installing ModeSDeco2 on a Raspberry Pi
Post by: IanH on April 13, 2018, 12:14:16 PM
symlink?

No idea if it would work but you could try:

ln -s source_file target_file

where source file is <path-to-file>/libssl.so.1.0.2

and target file is libssl.so.1.0.0
Title: Re: Installing ModeSDeco2 on a Raspberry Pi
Post by: sergsero on April 13, 2018, 03:31:25 PM
Hello David,

As soon as circumstances allow, I am going to upgrade the program code in order to reduce CPU utilization on ARM platforms and release a new version of modesdeco2.
The current version on ARM when working with RTL dongle, unfortunately, can use too many processor resources for SDR decoder.

However, if you would like to run the current version in the latest Raspbian (Debian 9), please test this build with it's default libssl.so.1.1/libcrypto.so.1.1 library:

RPi3 (Linux 4.9.80-v7+ #1098 SMP Fri Mar 9 19:11:42 GMT 2018 armv7l GNU/Linux)

modesdeco2_rpi3_deb9_20170127.tar https://drive.google.com/open?id=154p57cbmf_M4zhjpeKe2u9SPHWBpwDXq (https://drive.google.com/open?id=154p57cbmf_M4zhjpeKe2u9SPHWBpwDXq)

Quotelibssl.so.1.1 => /usr/lib/arm-linux-gnueabihf/libssl.so.1.1 (0x76f4b000)
libcrypto.so.1.1 => /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.1 (0x76d7a000)
Regards,
sergsero
Title: Re: Installing ModeSDeco2 on a Raspberry Pi
Post by: davidtriggs on April 14, 2018, 08:22:11 AM
Hi Sergsero,

Success! Yes the first time I ran modesdeco it almost killed the Pi, but it seems to be running pretty well now I have shut down a few things down.

Thanks (again) for your help.

David
Title: Re: Installing ModeSDeco2 on a Raspberry Pi
Post by: Conexia on May 02, 2018, 06:39:14 AM
Hi to all
One small question: what is the name of the file that modeSdeco / modeSmixer create for the coverage plot? And where is it located?

I need to delete it in my RPi to "reset" the plot

Thanks in advance
Antonio
Title: Re: Installing ModeSDeco2 on a Raspberry Pi
Post by: sergsero on May 02, 2018, 07:31:46 AM
Hi Antonio,

In present version such a file is created only in the modesmixer2.

The .json file is created in the current folder from which the program is run, in other words - in the current working directory.
In this case, the program itself may be located in another place on the disk.

For example, modesmixer2 is located in the /opt/mm2/modesmixer2 folder.
In the moment you are in your home working directory, for example, /home/Antonio.

The startup command string will looks like: '/opt/mm2/modesmixer2 --inconnect IP:Port ...'.
However, the json file will be created in your current working directory /home/Antonio.

p.s. p.s. Modesdeco2 has been slightly updated for v.20180429 and is now available for download in the first post of the main branch https://radarspotting.com/forum/index.php/topic,2978.msg13471.html#msg13471 (https://radarspotting.com/forum/index.php/topic,2978.msg13471.html#msg13471)

Best regards,
Sergsero
Title: Re: Installing ModeSDeco2 on a Raspberry Pi
Post by: Conexia on May 02, 2018, 08:39:32 AM
Hi, Sergsero
Thank you very much for your quick response, I´ll look for the file and delete or rename it.

As for Modesdeco2. I installed as soon as I saw it, and is working fine.
I was waiting for info about the difference with the previous version.

Thanks again.
Antonio
Title: Re: Installing ModeSDeco2 on a Raspberry Pi
Post by: fungsaihou on September 17, 2018, 01:08:30 AM
Quote from: IanH on February 21, 2015, 11:20:55 AM
There is now a quicker method to get ModesDeco2 running on a Raspberry Pi if you haven't already installed dump1090. See Post #5 for details.

You may want to check this post for some tips that are applicable to the new post  ;)

Started a separate thread to avoid mixing up with thread on development. Hope it helps.

I wanted to try ModeSDeco2 on a Pi but couldn't find the instructions. I'm sure they were here on the forum at some time. Anyway just running "modesdeco2" gives an "sdr" error. That made me realise what I needed to install.

Essentially we need the sdr libraries used by other ModeS software on Linux.

Assuming you have the Pi set up with Raspian and can connect to it remotely via Putty, follow David Taylor's instructions from item #5 for "Preparing the Raspberry Pi" at http://www.satsignal.eu/raspberry-pi/dump1090.html.

This was written to get dump1090 working but also valid for ModeSDeco2.

It is up to you whether you want to calibrate the dongle (I never have) but stop at the instruction that says "Now download the latest release dump1090 application source code."

Tips:

  • I would ignore the comment about not upgrading
  • Use Ctrl-C or right-click Copy to get the text into the clipboard, and then if you use PuTTY you can right-click on the text area of the terminal session to enter the command into the Raspberry Pi. Avoids the need for typing strange commands!
  • You probably will need to replace the default DVB driver so follow the linkin the instructions. Nano is a text editor and you can copy the three lines using the same Ctrl-C and then right click in Linux to copy them. To save and close nano , use Ctrl-O to save and Ctrl-X to exit. Then reboot.

The system is now ready to install and run Modesdeco2.

I use WinSCP to copy files to and from the Pi: http://winscp.net/eng/index.php. You get a drag and drop file manager interface.

Copy the version of modesdeco2 for your version of the Pi from the PC to the Pi.
In PUTTY type lsYou should see your modesdeco2_rpi_yyyymmdd.tgz file in red text. Select it with the mouse (run the mouse cursor over the filename to hightlight it, type  tar -xvf at the command line and then right click to copy the filename tar -xvf modesdeco2_rpi_yyyymmdd.tgz Hit return and the tgz file will be uncompressed.

Do a directory listing (type "ls") and you should see modesdeco2 in green text (means it is executable). Just typing "modesdeco2" won't work - you will need to type ./modesdeco2

Add the command line option you require.

You can avoid retyping long command lines by using the up and down arrows to fetch
previous commands  ;D.

This has installed modesdeco2 in the /home/pi directory.

Additional tips:


  • If you add a basestation.sqb file to this directory, you don't need to specify the location BUT be careful with the naming - in Linux, BaseStation.sqb and basestation.sqb are two different files. It seesm there is already software to read the sqb file installed.
  • If you add a directory called "silos"(note you can create it using WinScp, or using mkdir command depending on your knowledge) to hold all the .bmp files, the "path/to" will be /home/pi/silos


Edit: Comments and improvements welcome!

Not least how do you keep it running when PUTTY is closed? Tried "&" but not successful  :(

At last my ModeSDeco2 no longer run auto-start.
No idea what is going on.