Welcome to Radarspotting. Please login or sign up.

May 02, 2024, 06:26:05 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.

abcd567

Quote from: doctorvenables on August 14, 2019, 09:23:55 PM
.....I'd been playing with trying to write a service yet it looks like that's all been taken care of! Will try reinstalling with your method - Im sure it'll work.

I does work on my Pi 2, tried several times before posting it on Github and here.

The installation script does following:

(1) Creates a folder /usr/share/mm2

(2) Downloads file modesmixer2_rpi2-3_deb9_20190223.tgz, and saves it in folder /usr/share/mm2.

(3) Unzips downloaded file in folder /usr/share/mm2.

(4) Creates config file /usr/share/mm2/mm2.conf. The config file is as follows:
(It can be edited by user at any time to add, remove, or change arguments).

--inConnectId 127.0.0.1:30005:ADSB
--inConnectId 127.0.0.1:30105:MLAT
--web 8787
--location xx.xxxx:yy.yyyy


(5) Creates a startup script file /usr/share/mm2/mm2.sh. The startup file is started by systemd service. When service starts it, it does two things:
(a) Reads arguments from config file mm2.conf.
(b) issues a command to start modesmixer2 using config arguments read from file mm2.conf.

The contents of startup file are below:

#!/bin/sh
CONFIG=""
while read -r line; do CONFIG="${CONFIG} $line"; done < /usr/share/mm2/mm2.conf
/usr/share/mm2/modesmixer2 ${CONFIG}


(6) Creates a service file /lib/systemd/system/mm2.service. The service file starts modesmixer2 at boot, and also used to restart, stop, and status during normal running.

The content of mm2.service file are as below:

# modesmixer2 service for systemd

[Unit]
Description=ModeSMixer2
Wants=network.target
After=network.target

[Service]
RuntimeDirectory=modesmixer2
RuntimeDirectoryMode=0755
ExecStart=/bin/bash /usr/share/mm2/mm2.sh
SyslogIdentifier=modesmixer2
Type=simple
Restart=on-failure
RestartSec=30
RestartPreventExitStatus=64
Nice=-5

[Install]
WantedBy=default.target


(7) Enables mm2.service by following command
sudo systemctl enable mm2

(8 ) Starts modesmixer2 by systemd start command
sudo systemctl start mm2

(9) Announces completion, and advises to add latitude & longitude to file /usr/share/mm2/mm2.conf

doctorvenables

Thanks abcd567 - all proceeed well and it's now up and running. Will reboot in a bit and see what happens.

If it's of any use, the pi with modesmixer on it is an RPi3B with raspbian buster installed.

doctorvenables

Update - no joy I'm afraid. It does restart automatically but the data are gone.

abcd567

Did you point to Basestation.sqb in file mm2.conf?
You have to add this line in file /usr/share/mm2/mm2.conf

--db   /path/to/file/Basestation.sqb

abcd567

Quote from: doctorvenables on August 14, 2019, 11:14:41 PM
If it's of any use, the pi with modesmixer on it is an RPi3B with raspbian buster installed.

Ok, just eliminate possibility of Buster causing this issue.
If you have a spare microSD card, download and write Raspbian Stretch:

http://downloads.raspberrypi.org/raspbian_lite/images/raspbian_lite-2019-04-09/2019-04-08-raspbian-stretch-lite.zip

Install modesmixer on it (after installing dump1090-fa).

Alternatively install Piaware SD card image which is still Stretch based, then install modesmixer2.

andrewt

Hi I am on holiday and was going through a few posts on FA, FR24. PFC and Radar Spotting and came across modesmixer2. i downloaded it github from abcd567a , it works MLAT and all , but don't matter how i load the basestation.sqb, silhouettes and logos it just wouln't populate. i was on this for four days all times of the day and night. Enough of the preamble, i need some desperate help to see r
this running. i tried it on dump1090-mutability and dump-fa just would not work. Help!

abcd567


doctorvenables

Yes it could be browser related. Am using chrome so will try ie, edge, opera this morning.

Almost certainly not stretch related because I always had the same symptoms  - good guess though. Haven't got any spare microSD at the moment and my rpi3 has /root on usb ssd so I'd play with that at my peril for the time being.


doctorvenables

Connection to Basestation.sqb is almost certainly working - the file size is getting bigger so I assume that msm is writing to it.

Anmer

Quote from: doctorvenables on August 15, 2019, 09:50:09 AM
Connection to Basestation.sqb is almost certainly working - the file size is getting bigger so I assume that msm is writing to it.

If you have BaseStation Reporter do you see Sessions showing new data?
Here to Help.

doctorvenables

OK - not a browser issue - did the same in opera.
Will have a look at basestation reporter.. Good idea anmer. Never used it so will install it ASAP


doctorvenables


abcd567

Quote from: doctorvenables on August 16, 2019, 12:33:23 AM
Hi abcd567 - is this an updated version?
It was updated 2 days ago. When did you install modesmixer2 using my script?

To check if your version is old one or updated give following command

sudo systemctl status mm2

If the output is "Unit mm2.service could not be found", your version is old one.


doctorvenables

OK - so I managed to download an SQLite browser and can confirm that BaseStation.sqb is being written to with sensible data about plane flights (lastlocation, lastgroundspeed, firstaltitude and all that stuff.
Glad it's not being populate with lots of zero..
Any other ideas?