Welcome to Radarspotting. Please login or sign up.

May 25, 2026, 09:10:27 PM

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.

ModeSDeco2 and ModeSMixer2 - console programs for RTLSDR and transcoding

Started by sergsero, August 09, 2013, 03:08:08 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Anmer

Hi

Do you have the spec of the replacement SDR "dongle"?

Maybe a link to the item if you bought it online?

Not all of them can process Mode-S data.
Here to Help.

fat-tony

It may be a clash with the old dongle - see post #540/541 (or it may be an unsuitable dongle as @anmer has indicated)
Here's a scrape of the posts I found:
-----------------------------------------------------------------------------------------------------------------------------

Hi sergsero

How do I connect 2 RTL Dongles whit the ModeSDeco2 ?

I get this error when i try

2015-09-04 19:46:50.499  INFO     ModeSDeco2 v.20150815
2015-09-04 19:46:50.621  INFO     Device: 1 mnf: Realtek prod: RTL2838UHIDIR seial: 00000002 usb_claim_interface error -12
2015-09-04 19:46:50.649  ERROR   Can't open device: sdr_open(): Bad file descrptor

The other RTL2838UHIDIR has serial  00000001


Cheers

Peter
Logged

    VirtualRadar, RTL1090,ModeSDeco2,Modesmixer2,acarsdeco2,

Offline sergsero

    Member
    ****
    Posts: 336
    Country: ru

Re: ModeSDeco2 and ModeSMixer2 - console programs for RTLSDR and transcoding
« Reply #541 on: September 04, 2015, 08:21:21 pm »
Hi Peter,

Each instance of a program that only works with a single SDR device.

Option '--device-serial' or '--device-index' uses to assign the specific dongle for the program instance. There is  difference between first - it selects dongle via his serial number (constant attribute) but second is number of device (variable attribute) in the operating system.

Run program with the one option '--device-list' and determine serial numbers of your dongles.

Regards,
sergsero

abcd567

Quote from: Carlos on April 25, 2020, 03:13:00 PM

2020-04-25 15:08:27.389  INFO     ModeSDeco2 v.20151226
2020-04-25 15:08:27.452  INFO     Device: 0 mnf: Realtek prod: RTL2838UHIDIR serial: 00000001
2020-04-25 15:08:27.889  ERROR    Can't open device: sdr_set_freq(): Bad file descriptor
Press any key to continue . . .

Please do this and post the output of 2nd command


sudo apt-get install rtl-sdr   

rtl_test -t   

Carlos

Hi all,

Thanks for the reply.

When I press any key it just closes the screen.

The dongle is using the same serial as my current one.

When I look on zadig the driver is WinUSB ( 6 1.7600.16385).I have tried changing the settings as in there it shows my current dongle as RTL2838UHIDIR. I tried adding a new one using RTL2832U but it didnt work.

I bought it from Amazon

JVSISM USB2.0 DAB FM DVB-T RTL2832U R820T2 SDR RTL-SDR Dongle Stick Digital TV Tuner Receiver IR Remote with Antenna

Maybe I have bought one which doesnt work with modesdeco as suggested. :-(

Thanks for your help.

Carl

sergsero

Hello,

Your dongle is fully compatible with RTL2832U/U820T unit. To check its visibility and availability in the system you need to access it via the Command Prompt (Windows console).
Note: this description is based on Windows 10, but the majority of these methods should work in earlier versions of Windows, too.

While it's easy to just open the Command Prompt from the Start menu, that's not the only way to do it. Another way is to open Command Prompt from the Run Box.

Press Windows+R to open "Run" box. Type "cmd" and then click "OK" to open a regular Command Prompt. Type "cmd" and then press Enter to open a user Command Prompt or Ctrl+Shift+Enter to open it as an administrator.

You need to go to the directory where rtl_test is located if you want to use standard RTLSDR utilities.
Then execute the command (for example, let's assume that it is located on disk D:\, and you are currently on disk C:\)

C:\Temp>pushd D:\some\folder\where_you_put_rtl-sdr-release.
And run rtl_test -t.

Or move directly to the directory where modesdeco2 is located.
C:\Temp>pushd D:\some\folder\where_you_put_modesdeco2
And run modesdeco2 --device-list


If you only use a single instance of the dongle and it is the only one connected to the USB port, then exclude the option of any identification by serial number or index from the start line. Just run the program as usual, but without these options: --device-serial or --device-index.

And one more thing: Windows 10 will sometimes perform updated which overwrites the SDR drivers. So each time is updates you just need to run Zadig again and replace the driver.
When Zadig is running, go to 'Options' and make sure 'List all devices' is selected. At the 'Device' option, select 'Bulk-In, Interface (Interface 0)' (or in some cases, you might instead see 'RTL2832UHIDIR', then select this). Click on the big button labeled 'Replace Driver' or 'Install Driver'. Installing the driver may take a minute.
When installing the driver is done, you can now run modesdeco2 as usual via *.bat file or in command line with necessary options.

Best regards,
sergsero

Carlos

Hi Sergsero,

Thank you for the detailed reply. Unfortunately I cannot seem to get my command prompt to point to the right location. If possible are you able to include a screen print of the cmd prompt location so I can get a better idea of what I am doing wrong please?

Mine just defaults to c:\users\carl4.

My modesdeco 2 is located in c:\modesdeco2_windows_20151226_for_test_only

Best Regards

Carl

Conexia

Hello to evryone
For several months I've been using this setup for feeding FR24 and FlightAware:

Raspberry Pi 3 model B+ with Raspbian GNU/Linux 9 (stretch)
FlightAware Pro Stick Plus (blue)
ModeSdeco2 modesdeco2_rpi2-3_deb9_20180729
ModeSmixer2 modesmixer2_rpi2-3_deb9_20190413

From ModeSmixer2 I send data to FR24 and FlightAware and receive MLAT from FR24

The aircraft map is the ModeSmixer2 one.

Until a couple of weeks ago I was able to see the aircraft in the ModeSmixer2 map, but I suspect after a recent PiAware update I can´t see them in http://192.168.1.xx:8081

I tried to see them in ModeSdeco2 web interface in port 8585 but it also doesn't work

And now all I can see is Skyaware in port 8080 (that previously to the PiAware update was not working

Flightaware and FR24 data upload are still working fine

Can anyone tell me why I can't see ModeSdeco2 and ModeSmixer2 web interfaces?

adsb4fun

Hi!

Long time modesmixer2 user. First big thanks to the developer! Great work!

Im currently running modesmixer2 on the Dietpi image (dietpi.com), which in my case is running Debian Stretch. All is OK there.

Now im moving into a new Raspberry Pi and then the latest Dietpi image which is Debian Buster. And i can not get modesmixer2 to run.

I have downloaded the modesmixer2_rpi4_deb10_20190413.tgz.

The problem is, it runs but is not able to do any lookups. Or infact it does not seem to interpret the host/IP-field at all.

Regardless if i try www.google.com or 192.168.1.1 it says "can't resolve host xxx Service not found". Same with localhost

I want to stress that im in no way blaming modesmixer2. Im aware that im running a non "standard" image but need some hints on how to proceed. Is there something missing on the image that i need to install or take to the developer of Dietpi?

root@test:~# /root/modesmixer2_deb10 --inConnect localhost:30005 --outConnect beast:www.google.com:10000
2020-05-21 11:00:09.185  INFO     ModeSMixer2 v.20190413
2020-05-21 11:00:09.188  ERROR    outConnect(beast:www.google.com:10000) can't resolve host www.google.com Service not found
2020-05-21 11:00:09.189  INFO     outConnect(beast:www.google.com:10000) reconnect in 10 seconds
2020-05-21 11:00:09.190  ERROR    inConnect(localhost:30005) can't resolve host localhost Service not found
2020-05-21 11:00:09.190  INFO     inConnect(localhost:30005) reconnect in 10 seconds

root@test:~# /root/modesmixer2_deb10 --inConnect localhost:30005 --outConnect beast:192.168.1.1:10000
2020-05-21 11:00:13.750  INFO     ModeSMixer2 v.20190413
2020-05-21 11:00:13.755  ERROR    outConnect(beast:192.168.1.1:10000) can't resolve host 192.168.1.1 Service not found
2020-05-21 11:00:13.756  INFO     outConnect(beast:192.168.1.1:10000) reconnect in 10 seconds
2020-05-21 11:00:13.756  ERROR    inConnect(localhost:30005) can't resolve host localhost Service not found
2020-05-21 11:00:13.757  INFO     inConnect(localhost:30005) reconnect in 10 seconds

root@test:~# ping www.google.com
PING www.google.com (216.58.211.4) 56(84) bytes of data.
64 bytes from muc03s13-in-f4.1e100.net (216.58.211.4): icmp_seq=1 ttl=55 time=25.7 ms
64 bytes from muc03s13-in-f4.1e100.net (216.58.211.4): icmp_seq=2 ttl=55 time=28.4 ms
64 bytes from muc03s13-in-f4.1e100.net (216.58.211.4): icmp_seq=3 ttl=55 time=34.4 ms
64 bytes from muc03s13-in-f4.1e100.net (216.58.211.4): icmp_seq=4 ttl=55 time=25.5 ms
64 bytes from muc03s13-in-f4.1e100.net (216.58.211.4): icmp_seq=5 ttl=55 time=25.10 ms
64 bytes from muc03s13-in-f4.1e100.net (216.58.211.4): icmp_seq=6 ttl=55 time=25.1 ms

root@test:~# ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=0.198 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=0.184 ms
64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=0.233 ms


Linux test 4.19.97-v7l+ #1294 SMP Thu Jan 30 13:21:14 GMT 2020 armv7l GNU/Linux

PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"







Oblivian

adsb4fun - looks like in some you are using the wrong commandlines

First one you are telling it to send your data to google.. :) (did you copy an example perhaps)

and the latter it is unable to resolve using the word 'localhost'. This has been an issue on trimmed OS as sometimes missed from /etc/hosts

You would be best to use --inConnect 127.0.0.1:30005 and nothing else and see if at least it can get to the local 30005 port rather than resolve 'localhost'

Then work out what the internal test it uses has been left off that distro.
It may be dnsutils/nslookup

I expect being diet, it is possibly missing stuff, or being blocked by Pihole which appears to come preloaded.

abcd567

On 27th May 2020, Raspberry Pi foundation has released 64bit Raspbian which can be used on RPi3 and RPi4 as both have 64bit cpu.

(1) I downloaded and wrote this 64bit Raspbian image to microSD card of RPi 4.

(2) Installed 64bit versions of dump1090-fa and piaware using bash scripts at my Github account:

https://github.com/abcd567a/piaware-64bit-raspbian/blob/master/README.md


(3) Installed ModeSMixer2 using bash script at my Github account:

https://github.com/abcd567a/mm2/blob/master/README.md

However ModeSMixer2 failed as armhf versions of files libssl.so.1.1 and  libcrypto.so.1.1 are missing (only aarch64 versions of these files are available).


Tried to install missing armhf versions of above two files by installing libssl1.1:armhf package by fllowing command:

sudo apt install libssl1.1:armhf


Execution of above command resulted in replacement of about 450 packages:arm64 by packages:armhf, and the system collapsed (Do not attempt it).


Solved it by following workaround.

sudo mkdir libssl-armhf 
wget http://ftp.us.debian.org/debian/pool/main/o/openssl/libssl1.1_1.1.1d-0+deb10u3_armhf.deb   
sudo dpkg -x libssl1.1_1.1.1d-0+deb10u3_armhf.deb libssl-armhf   

sudo cp libssl-armhf/usr/lib/arm-linux-gnueabihf/libssl.so.1.1 /usr/lib/arm-linux-gnueabihf/   
sudo cp libssl-armhf/usr/lib/arm-linux-gnueabihf/libcrypto.so.1.1 /usr/lib/arm-linux-gnueabihf/   

sudo systemctl restart mm2 



After above workaround, ModeSMixer2 works OK. :)

.

sergsero

Hi abcd567,

I am very grateful for your messages that find a solution and explanation of issues with the software.

Below is a link to the 64 bit version of modesmixer2 that was built as aarch64 for the Raspberry Pi OS and Raspberry Pi 4. I hope that it will work with native OS packages. Otherwise, I will make a version with statically linked libraries.

https://drive.google.com/file/d/1EB_VunTA3UINzsJUduKTnssVwk-1XyFr/view?usp=sharing

$ file modesmixer2
modesmixer2: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=22eaa58312b649b379d00647b4c1e98c8102b046


ldd modesmixer2
        linux-vdso.so.1 (0x0000007f913a2000)
        libssl.so.1.1 => /usr/lib/aarch64-linux-gnu/libssl.so.1.1 (0x0000007f90f0d000)
        libcrypto.so.1.1 => /usr/lib/aarch64-linux-gnu/libcrypto.so.1.1 (0x0000007f90c65000)
        libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000007f90c36000)
        librt.so.1 => /lib/aarch64-linux-gnu/librt.so.1 (0x0000007f90c1e000)
        libdl.so.2 => /lib/aarch64-linux-gnu/libdl.so.2 (0x0000007f90c0a000)
        libstdc++.so.6 => /usr/lib/aarch64-linux-gnu/libstdc++.so.6 (0x0000007f90a7f000)
        libm.so.6 => /lib/aarch64-linux-gnu/libm.so.6 (0x0000007f909c2000)
        libgcc_s.so.1 => /lib/aarch64-linux-gnu/libgcc_s.so.1 (0x0000007f9099e000)
        libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000007f9082c000)
        /lib/ld-linux-aarch64.so.1 (0x0000007f91374000)


Best regards,
sergsero

Anmer

Quote from: sergsero on June 06, 2020, 10:43:58 AM
Hi abcd567,

I am very grateful for your messages that find a solution and explanation of issues with the software.

As are lots of other forum members.  Thanks to both of you.
Here to Help.

sergsero

Of course, I am always grateful to all forum members for help!

Best regards,
sergsero

Anmer

Sorry Sergsero.  I think you misunderstood my message.

I meant other forum members are grateful for the help offered by abcd567 and you.
Here to Help.

abcd567

Hi Sergsero

Thank you very much for providing link for downloading "modesmixer2_64bit_rpi4_Raspberry_Pi_OS_20200426.tgz".

I have now added following bash script in my Github page.


sudo bash -c "$(wget -O - https://raw.githubusercontent.com/abcd567a/mm2/master/install-mm2-64bit.sh)"   


Wrote a fresh image (Raspberry Pi OS 64 bit) to microSD card, booted RPi 4, and installed:
(1) dump1090-fa 64bit
(2) piaware 64bit
(3) ModeSMixer2 64bit (by running above bash command), and it is working OK. :)


CHECKED:


pi@raspberrypi:~ $ uname -a
Linux raspberrypi 5.4.42-v8+ #1319 SMP PREEMPT Wed May 20 14:18:56 BST 2020 aarch64 GNU/Linux




pi@raspberrypi:~ $ cd /usr/share/mm2

pi@raspberrypi:/usr/share/mm2 $ ls
LICENSE.MIT  mm2.conf  mm2.sh  modesmixer2  modesmixer2_64bit_rpi4_Raspberry_Pi_OS_20200426.tgz  modesmixer2.txt

pi@raspberrypi:/usr/share/mm2 $ file modesmixer2
modesmixer2: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=22eaa58312b649b379d00647b4c1e98c8102b046, stripped

pi@raspberrypi:/usr/share/mm2 $ ldd modesmixer2
        linux-vdso.so.1 (0x0000007f8a282000)
        libssl.so.1.1 => /usr/lib/aarch64-linux-gnu/libssl.so.1.1 (0x0000007f89def000)
        libcrypto.so.1.1 => /usr/lib/aarch64-linux-gnu/libcrypto.so.1.1 (0x0000007f89b47000)
        libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000007f89b18000)
        librt.so.1 => /lib/aarch64-linux-gnu/librt.so.1 (0x0000007f89b00000)
        libdl.so.2 => /lib/aarch64-linux-gnu/libdl.so.2 (0x0000007f89aec000)
        libstdc++.so.6 => /usr/lib/aarch64-linux-gnu/libstdc++.so.6 (0x0000007f89961000)
        libm.so.6 => /lib/aarch64-linux-gnu/libm.so.6 (0x0000007f898a4000)
        libgcc_s.so.1 => /lib/aarch64-linux-gnu/libgcc_s.so.1 (0x0000007f89880000)
        libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000007f8970e000)
        /lib/ld-linux-aarch64.so.1 (0x0000007f8a254000)




pi@raspberrypi:~ $ sudo systemctl status mm2
● mm2.service - ModeSMixer2
   Loaded: loaded (/lib/systemd/system/mm2.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2020-06-06 19:11:56 BST; 15min ago
Main PID: 1008 (bash)
    Tasks: 5 (limit: 787)
   CGroup: /system.slice/mm2.service
           ├─1008 /bin/bash /usr/share/mm2/mm2.sh
           └─1009 /usr/share/mm2/modesmixer2 --inConnectId 127.0.0.1:30005:ADSB --inConnectId 127.0.0.1:30105:MLAT --web 8787 --location 43.5801:-79.62

Jun 06 19:18:56 raspberrypi modesmixer2[1008]: 2020-06-06 19:18:56.606  INFO     inConnectId(127.0.0.1:30105:MLAT) reconnect in 439 seconds
Jun 06 19:26:07 raspberrypi modesmixer2[1008]: 2020-06-06 19:26:07.139  INFO     inConnectId(127.0.0.1:30005:ADSB) disconnected
Jun 06 19:26:07 raspberrypi modesmixer2[1008]: 2020-06-06 19:26:07.139  INFO     inConnectId(127.0.0.1:30005:ADSB) reconnect in 10 seconds
Jun 06 19:26:15 raspberrypi modesmixer2[1008]: 2020-06-06 19:26:15.607  INFO     inConnectId(127.0.0.1:30105:MLAT) connecting 127.0.0.1:30105
Jun 06 19:26:15 raspberrypi modesmixer2[1008]: 2020-06-06 19:26:15.610  INFO     inConnectId(127.0.0.1:30105:MLAT) connected
Jun 06 19:26:17 raspberrypi modesmixer2[1008]: 2020-06-06 19:26:17.140  INFO     inConnectId(127.0.0.1:30005:ADSB) connecting 127.0.0.1:30005
Jun 06 19:26:17 raspberrypi modesmixer2[1008]: 2020-06-06 19:26:17.141  INFO     inConnectId(127.0.0.1:30005:ADSB) connected
Jun 06 19:26:17 raspberrypi modesmixer2[1008]: 2020-06-06 19:26:17.589  INFO     inConnectId(127.0.0.1:30005:ADSB) BEAST data stream detected
Jun 06 19:26:20 raspberrypi modesmixer2[1008]: 2020-06-06 19:26:20.866  INFO     Coverage area was determined
Jun 06 19:26:20 raspberrypi modesmixer2[1008]: 2020-06-06 19:26:20.866  INFO     Magnetic declination calculated