AirNav Systems Forum

AirNav RadarBox and RadarBox24.com => AirNav RadarBox and RadarBox24.com Discussion => Topic started by: Taxom on July 15, 2022, 03:59:44 AM

Title: mlat error
Post by: Taxom on July 15, 2022, 03:59:44 AM
Orange Pi Zero
After the update, "Mlat" stopped working.

How to fix it?

Code: [Select]
root_orangepizero:~# sudo systemctl status  rbfeeder
● rbfeeder.service - RBFeeder Service
   Loaded: loaded (/lib/systemd/system/rbfeeder.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2022-07-14 23:21:50 EDT; 34s ago
  Process: 25645 ExecStartPre=/bin/mkdir /var/run/rbfeeder (code=exited, status=1/FAILURE)
  Process: 25646 ExecStartPre=/bin/chown rbfeeder:rbfeeder /var/run/rbfeeder (code=exited, status=0/SUCCESS)
  Process: 25647 ExecStartPre=/bin/touch /var/log/rbfeeder.log (code=exited, status=0/SUCCESS)
  Process: 25649 ExecStartPre=/bin/chown rbfeeder:rbfeeder /var/log/rbfeeder.log (code=exited, status=0/SUCCESS)
  Process: 25650 ExecStartPre=/bin/chown rbfeeder:rbfeeder /etc/rbfeeder.ini (code=exited, status=0/SUCCESS)
  Process: 25651 ExecStartPre=/bin/setfacl -m u:www-data:rwx /etc/rbfeeder.ini (code=exited, status=0/SUCCESS)
 Main PID: 25652 (rbfeeder)
    Tasks: 9 (limit: 421)
   Memory: 1.5M
   CGroup: /system.slice/rbfeeder.service
           └─25652 /usr/bin/rbfeeder

Jul 14 23:21:50 orangepizero rbfeeder[25652]:     open(pidfile, 'w').write(pid)
Jul 14 23:21:50 orangepizero rbfeeder[25652]: PermissionError: [Errno 13] Permission denied: '/run/mlat-client.pid'
Jul 14 23:21:51 orangepizero rbfeeder[25652]: [2022-07-14 23:21:51]  Connection established.
Jul 14 23:21:51 orangepizero rbfeeder[25652]: [2022-07-14 23:21:51]  Client type: Raspberry Pi
Jul 14 23:21:51 orangepizero rbfeeder[25652]: [2022-07-14 23:21:51]  Connection with RadarBox24 server OK! Key accepted by se
Jul 14 23:21:51 orangepizero rbfeeder[25652]: [2022-07-14 23:21:51]  This is your station serial number: EXTRPI014534
Jul 14 23:22:20 orangepizero rbfeeder[25652]: Traceback (most recent call last):
Jul 14 23:22:20 orangepizero rbfeeder[25652]:   File "/usr/bin/mlat-client", line 108, in <module>
Jul 14 23:22:20 orangepizero rbfeeder[25652]:     open(pidfile, 'w').write(pid)
Jul 14 23:22:20 orangepizero rbfeeder[25652]: PermissionError: [Errno 13] Permission denied: '/run/mlat-client.pid'
lines 1-25/25 (END)
Title: Re: mlat error
Post by: abcd567 on July 15, 2022, 04:41:45 AM
Reboot Pi and after reboot, check again.
Title: Re: mlat error
Post by: Taxom on July 15, 2022, 05:19:08 AM
I tried it. But it doesn't help

Code: [Select]
[email protected]:~# sudo systemctl status  rbfeeder
● rbfeeder.service - RBFeeder Service
   Loaded: loaded (/lib/systemd/system/rbfeeder.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2022-07-15 01:13:36 EDT; 3min 30s ago
  Process: 1119 ExecStartPre=/bin/mkdir /var/run/rbfeeder (code=exited, status=0/SUCCESS)
  Process: 1217 ExecStartPre=/bin/chown rbfeeder:rbfeeder /var/run/rbfeeder (code=exited, status=0/SUCCESS)
  Process: 1230 ExecStartPre=/bin/touch /var/log/rbfeeder.log (code=exited, status=0/SUCCESS)
  Process: 1241 ExecStartPre=/bin/chown rbfeeder:rbfeeder /var/log/rbfeeder.log (code=exited, status=0/SUCCESS)
  Process: 1242 ExecStartPre=/bin/chown rbfeeder:rbfeeder /etc/rbfeeder.ini (code=exited, status=0/SUCCESS)
  Process: 1243 ExecStartPre=/bin/setfacl -m u:www-data:rwx /etc/rbfeeder.ini (code=exited, status=0/SUCCESS)
 Main PID: 1244 (rbfeeder)
    Tasks: 9 (limit: 421)
   Memory: 1.7M
   CGroup: /system.slice/rbfeeder.service
           └─1244 /usr/bin/rbfeeder

Jul 15 01:15:53 orangepizero rbfeeder[1244]: [2022-07-15 01:15:53]  Connection with RadarBox24 server OK! Key accepted by server.
Jul 15 01:15:53 orangepizero rbfeeder[1244]: [2022-07-15 01:15:53]  This is your station serial number: EXTRPI014534
Jul 15 01:16:38 orangepizero rbfeeder[1244]: Traceback (most recent call last):
Jul 15 01:16:38 orangepizero rbfeeder[1244]:   File "/usr/bin/mlat-client", line 108, in <module>
Jul 15 01:16:38 orangepizero rbfeeder[1244]:     open(pidfile, 'w').write(pid)
Jul 15 01:16:38 orangepizero rbfeeder[1244]: PermissionError: [Errno 13] Permission denied: '/run/mlat-client.pid'
Jul 15 01:16:52 orangepizero rbfeeder[1244]: [2022-07-15 01:16:52]  ******** Statistics updated every 60 seconds ********
Jul 15 01:16:52 orangepizero rbfeeder[1244]: [2022-07-15 01:16:52]  Packets sent in the last 60 seconds: 61, Total packets sent since startup: 6
Jul 15 01:16:52 orangepizero rbfeeder[1244]: [2022-07-15 01:16:52]  Data sent: 2.3 KB
Jul 15 01:16:52 orangepizero rbfeeder[1244]: [2022-07-15 01:16:52]  Data received: 31 B
Title: Re: mlat error
Post by: abcd567 on July 15, 2022, 10:26:50 PM
I tried it. But it doesn't help

Code: [Select]

   CGroup: /system.slice/rbfeeder.service
           └─1244 /usr/bin/rbfeeder



The mlat-client did not start. If started, you will see 3 lines in CGroup: like below


Code: [Select]
     CGroup: /system.slice/rbfeeder.service
             ├─1484 /usr/bin/rbfeeder
             └─1496 /usr/bin/python3.9 /usr/bin/mlat-client --input-type dump1090 --input-connect 127.0.0.1:32457 --server mlat1.rb24.com:40900 --lat 43.>



First update
Code: [Select]
sudo apt update



After update, issue following commands and post their outputs

Code: [Select]
apt-cache policy rbfeeder

apt-cache policy mlat-client

apt-cache policy python3.9



Also post output of following command
NOTE: Replace your feeder key by xxxxxxxxxx  when posting in forum
Code: [Select]
cat /etc/rbfeeder.ini 




Title: Re: mlat error
Post by: Taxom on July 15, 2022, 11:47:45 PM
At the same time, mlat on Adsbexchange continues to work normally



Title: Re: mlat error
Post by: abcd567 on July 16, 2022, 01:08:55 AM
OK you have Buster (Debian 10), whuch requires python3.7 to run mlat-client.

Please post output of following command

apt-cache policy python3.7
Title: Re: mlat error
Post by: Taxom on July 16, 2022, 01:52:48 AM
In the previous post there is the result of this command. In the first screenshots.

Sorry for the screenshots, but the forum does not allow to publish a text code, referring to the presence of spam in it.
Title: Re: mlat error
Post by: abcd567 on July 16, 2022, 03:23:29 AM
(1) Why port 30205 instead of 30005 ?
See attached screen shot.

(2) Try these commands

Code: [Select]

sudo apt-get install --reinstall rbfeeder

sudo reboot

sudo systemctl status rbfeeder 



Title: Re: mlat error
Post by: Taxom on July 16, 2022, 03:35:22 AM
this
Title: Re: mlat error
Post by: Taxom on July 16, 2022, 03:45:17 AM
nothing changed ((
Title: Re: mlat error
Post by: abcd567 on July 16, 2022, 04:26:14 AM
Try these commands

Code: [Select]

sudo apt-get install --reinstall mlat-client

sudo apt-get install --reinstall python3.7

sudo reboot

sudo systemctl status rbfeeder 



Title: Re: mlat error
Post by: abcd567 on July 16, 2022, 02:01:03 PM
At the same time, mlat on Adsbexchange continues to work normally

If Flightaware MLAT and Adsbexchange MLAT are working OK, it does not guarantee that RB24 MLAT should also work OK.

The reason is that there are THREE (3) INDEPENDENT mlat-clients installed on your Pi. These 3 work independent of each other. If any one of these is defective or stops working, it will stop mlat of only that feeder for which it was installed. Other feeder's mlat will continue to work normally.

(1) mlat-client for Flightaware (installed automatically during installation of piaware)
Code: [Select]
/usr/lib/piaware/helpers/fa-mlat-client 

(2) mlat-client for Adsbexchange (installed automatically during installation of Adsbexchange feeder)
Code: [Select]
/usr/local/share/adsbexchange/venv/bin/mlat-client 

(3) mlat-client for Radarbox24 (installed manually by the user: sudo apt install mlat-client)
Code: [Select]
/usr/bin/mlat-client


.
Title: Re: mlat error
Post by: abcd567 on July 16, 2022, 02:42:04 PM
Try this command to see if mlat-client is OK
(Replace xx.xxx, yy.yyyy, zzz, aaaaa by their actual values)

Quote

sudo  /usr/bin/python3.7 /usr/bin/mlat-client --input-type dump1090 --input-connect 127.0.0.1:32457 --server mlat1.rb24.com:40900 --lat xx.xxx --lon yy.yyy --alt zzz --user aaaaaaa


If mlat-client is OK, you should get this:
Code: [Select]
mlat-client ax_0.3.9 starting up
Connected to multilateration server at mlat1.rb24.com:40900, handshaking
Server says:

        AirNav Server

        The multilateration server source code is available under
        the terms of the Affero GPL (v3 or later). You may obtain
        a copy of this server's source code at the following
        location: https://github.com/adsbexchange/mlat-server

Handshake complete: Compression zlib2, UDP transport disabled, Split sync disabled
Input connected to 127.0.0.1:32457
Input format changed to BEAST, 12MHz clock

Title: Re: mlat error
Post by: Taxom on July 16, 2022, 05:06:27 PM
here
Title: Re: mlat error
Post by: Taxom on July 16, 2022, 05:22:55 PM
I do not know, it can help solve my problem. But in this time with Radarbox  update, the system was automatically installed by two packages dh-sysuser_1.3.3_all.deb and sysuser-helper_1.3.3_all.deb .
Title: Re: mlat error
Post by: abcd567 on July 16, 2022, 06:10:55 PM
(1) Open file rbfeeder.ini for editing
sudo nano /etc/rbfeeder.ini

(2) In file opened, in [mlat] section ADD line shown in RED
NOTE: The entire text in RED make one single line command, though forum might have wrapped it in 2 or 3 lines.



[client]
key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
sn=EXTRPI014534

lat=43.62
lon=-79.48
alt=128

network_mode=true
log_file=/var/log/rbfeeder.log
disable_log=0

sat_used=0

sat_visible=0

[network]
mode=beast
external_port=30205
external_host=127.0.0.1

[mlat]
autostart_mlat=true
#mlat_cmd=/usr/bin/python3.7 /usr/bin/mlat-client
mlat_cmd=/usr/bin/python3.7 /usr/bin/mlat-client --input-type dump1090 --input-connect 127.0.0.1:32457 --server mlat1.rb24.com:40900 --lat 43.62 --lon -79.48 --alt 128 --user EXTRPI014534 --results beast,connect,127.0.0.1:32004


(3) Save file (Press Ctrl & o Keys togather) and Close file (Press Ctrl & x Keys togather)

(4) Reboot Pi

(5) Check status. Is mlat line is there in CGroup: ?
sudo systemctl status rbfeeder




Title: Re: mlat error
Post by: Taxom on July 16, 2022, 06:34:36 PM
here it is
Title: Re: mlat error
Post by: abcd567 on July 16, 2022, 07:28:01 PM
Delete the RED command you have added under [mlat]]  as per my previous post,  then reboot Pi,  then check status. L
Title: Re: mlat error
Post by: Taxom on July 16, 2022, 07:35:50 PM
this
Title: Re: mlat error
Post by: abcd567 on July 16, 2022, 09:40:53 PM
Seems mlat-client installed from RB24 site (using command sudo apt install mlat-client) has some defect. Better purge it, then build & install from source code

(1) First purge existing package
Code: [Select]
sudo apt purge mlat-client


(2) Install dependencies and tools required to build package from source-code
Code: [Select]
sudo apt update -y
sudo apt install -y git curl build-essential debhelper python-dev python3-dev

(3) Downloaded source code and build mlat-client's installation package.
Code: [Select]
cd
git clone https://github.com/mutability/mlat-client.git

cd mlat-client
sudo apt install -y dh-python
sudo dpkg-buildpackage -b -uc


(4) Install newly built package by following command
Code: [Select]
cd
sudo dpkg -i mlat-client_*.deb 


Title: Re: mlat error
Post by: Taxom on July 16, 2022, 09:45:50 PM
Will this not break me Mlat with other services?
Title: Re: mlat error
Post by: abcd567 on July 16, 2022, 09:57:18 PM
Will this not break me Mlat with other services?

No, it wont break your other feeders. The reason is that there are THREE (3) INDEPENDENT mlat-clients installed on your Pi. These 3 work independent of each other. If any one of these is removed or replaced, it will affect mlat of only that feeder for which it was installed. Other feeder's mlat will continue to work normally.

(1) Location of fa-mlat-client binary installed for Flightaware (installed automatically during installation of piaware)
Code: [Select]
/usr/lib/piaware/helpers/fa-mlat-client 

(2) Location of mlat-client binary installed for Adsbexchange (installed automatically during installation of Adsbexchange feeder)
Code: [Select]
/usr/local/share/adsbexchange/venv/bin/mlat-client 

(3) Location of mlat-client binary installed for Radarbox24 (installed manually by the user: sudo apt install mlat-client OR sudo dpkg -i mlat-client_*.deb)
Code: [Select]
/usr/bin/mlat-client


.
Title: Re: mlat error
Post by: Taxom on July 16, 2022, 10:26:43 PM
something went wrong
Title: Re: mlat error
Post by: abcd567 on July 16, 2022, 11:45:54 PM
something went wrong

Oops, there were some minor errors in the commands which resulted in failure to build mlat-client from source code. I have made following corrections in my post for building mlat-client from source code. Now it will work ok.

(1) Changed:
cd /~

To:
cd


(2) Changed:
cd /mlat-client

To:
cd mlat-client

Please try to build and install mlat-client again using the corrected commands below:

Code: [Select]
cd 
cd mlat-client
sudo dpkg-buildpackage -b -uc


cd
sudo dpkg -i mlat-client_*.deb 


.
Title: Re: mlat error
Post by: Taxom on July 17, 2022, 11:28:32 AM
Thank you very much! It worked!
Title: Re: mlat error
Post by: abcd567 on July 17, 2022, 12:03:13 PM


Glad to know your problem is solved   :)


.
Title: Re: mlat error
Post by: abcd567 on July 18, 2022, 04:23:44 PM
When in future any update/upgrade command is run, it will replace healthy mlat-client (which you have built yourself) by the defective mlat-client from RB24 repository.

To prevent this, put your mlat-client on hold by following command
Code: [Select]
sudo apt-mark hold  mlat-client 

The responce to above command will be:

mlat-client set on hold..



.
Title: Re: mlat error
Post by: Taxom on July 18, 2022, 05:10:39 PM
Thank you.
Now I would like to figure out why, after some of the previous updates, OrangePi now changes the MAC address after each reboot.
Title: Re: mlat error
Post by: abcd567 on July 18, 2022, 05:56:18 PM
Now I would like to figure out why, after some of the previous updates, OrangePi now changes the MAC address after each reboot.

Very old post (June 2016), but may give you some insight.
On page below, scroll down to : (3) MAC address spoof


WORK AROUND FOR 5 ISSUES
Orange Pi PC / ARMBIAN 5.10 Debian 8 (jessie) (https://discussions.flightaware.com/t/orange-pi-pc-a-15-alternative-to-rpi-2-so-far-so-good/17647/197)




.


.
Title: Re: mlat error
Post by: Taxom on July 18, 2022, 06:46:07 PM
This is the correct format /etc/network/interfaces for wifi
Code: [Select]
source /etc/network/interfaces.d/*
# Network is managed by Network manager
auto lo
iface lo inet loopback

iface wlan0
  hwaddress ether xx:xx:xx:FC:76:3F
Title: Re: mlat error
Post by: abcd567 on July 18, 2022, 08:54:34 PM
This is the correct format /etc/network/interfaces for wifi
Code: [Select]
source /etc/network/interfaces.d/*
# Network is managed by Network manager
auto lo
iface lo inet loopback

iface wlan0
  hwaddress ether xx:xx:xx:FC:76:3F
Are you using Wired connection Ethernet (eth0) or WiFi (wlan0)?



Try this:
Code: [Select]
sudo nmtui 

Go to "Edit a connection"
Choose "Ethernet" OR "Wi-Fi", whichever you are using, then highlight "Edit" and press Enter Key.
You will see MAC address under "Device"



.
Title: Re: mlat error
Post by: Taxom on July 19, 2022, 09:21:25 PM
Yes I'm using wifi connect to my pi.
At some point MAC started to change after every reboot. I would like MAC to stay default.
I found solution to delete NetworkManager but I'm not sure if it works and  doesn't break system.

My "device" field is empty.

Thanks in advance.
Title: Re: mlat error
Post by: abcd567 on July 19, 2022, 09:50:08 PM
Yes I'm using wifi connect to my pi.
At some point MAC started to change after every reboot. I would like MAC to stay default.
I found solution to delete NetworkManager but I'm not sure if it works and  doesn't break system.

My "device" field is empty.

Thanks in advance.


Does your OrangePi has an integral WiFi or you have plugged-in a USB WiFi dongle?

https://forum.armbian.com/topic/4876-orange-pi-zero-random-mac-address-split-from-bpi-r1/

https://blogs.gnome.org/thaller/2016/08/26/mac-address-spoofing-in-networkmanager-1-4-0/


Title: Re: mlat error
Post by: Taxom on July 20, 2022, 02:44:44 AM
I have a problem again. ((
Now the mlat is working fine, but rbfeeder cannot connect to the server. Feeders for other services work fine.

I did not touch anything in the settings.

Yes my Pi has an integral WiFi.
Title: Re: mlat error
Post by: abcd567 on July 20, 2022, 02:55:35 AM
(1) Reboot Pi, then after 10 minutes check if your station connected:
radarbox24.com/stations/EXTRPI014534

(2) You will have two (2) MAC addresses, one for wired connection (eth0) and other for WiFi (wlan0)