Welcome to Radarspotting. Please login or sign up.

January 16, 2025, 09:23:38 AM

Login with username, password and session length

New Members

New Members

You should get an activation email when you join.  If not, please use the Contact option.

Installing ModeSDeco2 on a Raspberry Pi

Started by IanH, February 21, 2015, 11:20:55 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

IanH

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  :(

Triple7

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
SBS-1eR, FA ProStick + 1090 filter

sergsero

#2
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

IanH

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


Triple7

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
SBS-1eR, FA ProStick + 1090 filter

IanH

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]

Triple7

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]
SBS-1eR, FA ProStick + 1090 filter

IanH

You need to add --rbs into the command line to get Mode A/C

Triple7

SBS-1eR, FA ProStick + 1090 filter

IanH

I only found it on Sunday when I was searching through examples and wondered what it did  ;)

Radio2.0

Is there any benefit for an Pi instead of the Pc Version?
My Server run 24/7 so...
>>> I looking for People who want exchange the VRS Data with me. <<<
I life near LOWW / VIE and see Ground Traffic too.

davidtriggs

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

IanH

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

sergsero

#13
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

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

davidtriggs

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