FlightAware Discussions

Automated Installation of ModeSMixer2 & ModeSDeco2 on RPi

@AvioguyYYC

Just now tried the command by copy-paste. Works ok.

(1) If you copy-paste from what you have posted above (i.e. the command is converted to a web link), it will fail.

You have to copy-paste from below in which command is NOT converted to a web link.

wget http://flightaware.com/adsb/piaware/files/packages/pool/piaware/p/piaware-support/piaware-repository_3.7.2_all.deb

.
(2) Take care to copy whole command togather. Do not copy it part-by-part. The command is actually a single contnuous line, but is displayed above as multiple lines due to word wrap.

It worked!
Thank you once again!
Cheers

1 Like

For my new device i used your install script, works perfect.
Now adding the second receiver to it as well.

1 Like

Why are all data lost after reboot of the device?

My device lost connection tonight because of the case and the WiFi repeater to far away.
Initially i thought the device got stuck and i rebooted it (switching power supply off and on).

Now MM2 started over again. Data from yesterday are not documented.

Yes, when the script was made, the latest version of mm2 at that time was used. That version had this issue, and author of mm2 had mentioned he will try to solve it in next version. I have checked now, the new version is available, so I will have to modify my script, create two separate scripts, one for RPi2/3, other for RPi4, as now there are two separate versions of mm2.

I dont have RPi4, so cannot test it.

ok, thanks.

If you need a tester, let me know
Not that critical, currently i use the combined tar script of @wiedehopf

I replaced old version (2019-02-23) by new version (2019-04-13) on Pi 2, and found the data gets lost upon restart, like the old version.

1 Like

Just installed MM2 again based on your script. Works now monitoring two devices without issues. However i can confirm that data still gets lost on restart.

Another thing i found in the log, maybe you need to fix that in the script. It’s more a β€œcosmetic” thing.

Configuration file /lib/systemd/system/mm2.service is marked executable. Please remove executable permission bits. Proceeding anyway.

I’ve chmod the file to 644

1 Like

Thanks for pointing out.

Line 63 of install-mm2.sh was:
sudo chmod 744 ${SERVICE_FILE}

Now changed it to:
sudo chmod 644 ${SERVICE_FILE}

1 Like

Meanwhile i’ve extended my little project and I am connected to a colleague of mine.
I have installed VRS on a small server and broadcast to it from my two devices via socat (thanks @wiedehopf for the combine1090 script).

I would like to get the graphs from modesmixer2 there as well.
Installation went fine, but MM2 won’t see any aircraft. I tried to β€œrebroadcast” from the VRS there, but the data are obviously not recognized.

Any ideas?

sudo nano /usr/share/mm2/mm2.conf

--inConnectId 127.0.0.1:30005:ADSB
--inConnectId 127.0.0.1:30105:MLAT
--outServer beast:31005
--outServer avrmlat:31105
--web 8787
--location 43.xxxx:-79.xxxx  

 

MAP

Following line displays map at IP-of-PI:8787
--web 8787

 

INPUT

Following lines grab data from dump1090-fa running on same RPi as the ModeSMixer2:

--inConnectId 127.0.0.1:30005:ADSB
--inConnectId 127.0.0.1:30105:MLAT

 

OUTPUT

Following lines output data to combine1090 or a socat connection which is configured to get data from these ports:

--outServer beast:31005
--outServer avrmlat:31105

 

CHECK OUTPUT AT PORT 31005

$ nc 192.168.0.21 31005
3       β–’β–’β–’β–’'β–’β–’β–’8Xβ–’tSβ–’5β–’
                        3       β–’β–’β–’e+β–’β–’β–’β–’Yβ–’β–’1β–’β–’β–’g3      β–’β–’β–’β–’β–’wβ–’Yβ–’β–’Yj3   β–’δΌ’β–’β–’β–’wβ–’β–’(β–’(β–’S<2        β–’β–’8(]β–’β–’β–’Cβ–’s2    β–’β–’q&β–’β–’2 ▒郐-]β–’β–’β–’Cβ–’c2    β–’β–’qβ–’%]β–’;mβ–’β–’β–’2   β–’β–’]β–’wβ–’uβ–’β–’3      β–’
β–’β–’β–’Hβ–’
Vβ–’β–’0β–’a)β–’3       β–’'β–’Wβ–’β–’β–’wβ–’!
β–’β–’P0β–’r3 β–’Nη²­β–’β–’wβ–’β–’β–’β–’β–’33β–’wβ–’Yβ–’β–’/β–’β–’β–’β–’β–’Zβ–’5β–’Q2β–’β–’(β–’(β–’β–’5β–’[eX0]β–’β–’β–’Cβ–’D2β–’β–’β–’έ„$β–’β–’13   έ¬β–’β–’0β–’β–’β–’β–’β–’β–’P\h@~PuTTY3   έ²β–’n,β–’β–’β–’β–’β–’β–’X
                           β–’^C

CHECK OUTPUT AT PORT 31105

 $ nc 192.168.0.21 31105
@000877A03BF6200007306B2FAA;
@000877A8EAF18DC04810EA09D848013C081A8832;
@000877C2A5188DACB826223B9C7904D8207D81A2;
@000877C618F08DC04E8FF8000006005AB0410177;
@000877C64EFB5DC04810081F27;
@000877CAC80A8DC04810582BD1670512722C53EE;
@000877CE765B8DC04810990C5AA05824050E5D50;
@000877CF9E178DC04E8F5970A4EA89625A28E5F4;
@000877D57AAD5DA0C0EA4B2FC7;
@000877EEF81602E19839486FF2;
@00087820A87E8DC0481D583B110BF4FC99DA294D;
@0008782117F45DC0481DF7A374;
@000878282A898DC04810582BD4E979831DDBF25F;
^C

Any idea how to get a BaseStation.sqb and FlightRoutes.sqb to work with mm2?
I tried copying the ones from by VRS install, but it doesn’t like them…
Seems like it doesn’t like the formats.

Added to the mm2.conf

--db /home/pi/BaseStation.sqb
--frdb /home/pi/FlightRoutes.sqb

ERROR    sqlite3_prepare_v2() SELECT LocationID FROM Locations ORDER BY LocationID DESC LIMIT 1; no such table: Locations
 terminate called after throwing an instance of 'BaseStationDbException'
 what():  sqlite3_prepare_v2() SELECT LocationID FROM Locations ORDER BY LocationID DESC LIMIT 1; no such table: Locations
 /usr/share/mm2/mm2.sh: line 4:  2718 Aborted                 /usr/share/mm2/modesmixer2 ${CONFIG}

and removing the --db line and just leaving the --frdb

ERROR    sqlite3_prepare_v2() SELECT route FROM FlightRoute WHERE flight = ? ORDER BY updatetime DESC LIMIT 1; no such 
ERROR    sqlite3_step() no such table: FlightRoute 1

@mikkyo

I have i idea about db.
Better ask here:

ModeSDeco2 and ModeSMixer2 - console programs for RTLSDR and transcoding

1 Like