Together we make EasyVFR

Meldingen
Alles wissen

[Opgelost] Still unusable - missing connectivity to emulated FLARM

31 Berichten
5 Gebruikers
0 Reactions
2,273 Bekeken
Berichten: 53
Topic starter
Estimable Member
Deelgenomen: 5 jaar geleden

Hello, I have checked EasyVFR 4 after long time and it looks much better. I would also use it! 🙂 But will not 🙁

The reason is, for flight safety I use emulated FLARM device on EVFR3, that sends FLARM NMEA data on IP port 2000 and it does not work. I also have hardware emulated FLARM device, that receives GPS data sent from EVF3 at 255.255.255.255:2001 and sends NMEA to EVFR3 at 192.168.2.1:2000. That does not work either in EVFR4 because there is no GPS sharing settings in EVFR4.

So I will still stick with EVFR3, because it shows me nearby traffic and even exact location of other traffic on map, just with use of short python script that sends all data to EVFR3 at 127.0.0.1:2000.

Jan

Onderwerp trefwoorden
30 reacties
Berichten: 75
Beta tester
Estimable Member
Deelgenomen: 6 jaar geleden

Hello Jan,

 

what devices are you using?

 

Happy Landings

Ubi Sumus

Beantwoorden
6 reacties
Deelgenomen: 5 jaar geleden

Estimable Member
Berichten: 53

@ubi

Hello Ubi, thanks for getting back to me.

I have own software script that checks for nearby aircrafts, sends PFLAA sentence to TCP port 127.0.0.1:2000, where EVFR3 picks it up. I do not send PFLAU because it is only for alerts and I do not send GPRMC, because I want EVFR3 to use its own GPS.

It looks like EVFR4 does not detect PFLAA on 127.0.0.1:2000 and there is no option to set port number.

Jan

Beantwoorden
Jörg Walther
Beta tester
Deelgenomen: 6 jaar geleden

Trusted Member
Berichten: 17

@jbrepogmail-com

hello Jan,

can you share mir details how to use EasyVFR o send otr FLARM? 

I am looking for such a solution for a while now and this is the first time I heard about suc an option.

Thaks in advance for considering my request.

Best regards

Jörg

Beantwoorden
Admin
Deelgenomen: 6 jaar geleden

Famed Member
Berichten: 1027

@joerg-walthert-online-de

I think Jan doesn’t mean easyvfr is sending FLARM data; I think he means FLARM data is visible on his easyvfr4 using an external device that receives flarm information and sends it to ev4

Beantwoorden
Jörg Walther
Beta tester
Deelgenomen: 6 jaar geleden

Trusted Member
Berichten: 17

@rob-weijers

OK, thanks Rob.

Beantwoorden
Jörg Walther
Beta tester
Deelgenomen: 6 jaar geleden

Trusted Member
Berichten: 17

BTW: it works perfect for me with both FLARM and ADS-B signals received by Stratux.

Beantwoorden
Deelgenomen: 5 jaar geleden

Estimable Member
Berichten: 53

@ubi

I also tested on EasyADSB, the hardware FLARM emulator based on RaspberryPi, but that does not work either.

Beantwoorden
Berichten: 75
Beta tester
Estimable Member
Deelgenomen: 6 jaar geleden

@Jan

Just checked: sending PFLAA to port 2000 shows the traffic in EV 4.0.17

Beantwoorden
1 reactie
Deelgenomen: 5 jaar geleden

Estimable Member
Berichten: 53

@ubi

Hello Ubi, can you please check this?

What if you send following sentence to 127.0.0.1:2000 over TCP. Does it show aircraft on screen? Not in my EVFR4. In EVFR3 it does. I have EVFR4 configured as FLARM at IP 127.0.0.1 (no port, I also tried 127.0.0.1:2000 but no change):

$PFLAA,0,-13573,-1115,450,1,24601d9c,352,NG5_OK-YAI14_,40,0,0*FF

 

My script that sends messages detects that "something" picks up on TCP port 2000, but no sign in EVFR4.

Thanks for trying, Jan

 

Beantwoorden
Berichten: 53
Topic starter
Estimable Member
Deelgenomen: 5 jaar geleden

Thanks very much. Have you sent over TCP? Can you please try TCP?

Jan

Beantwoorden
Berichten: 75
Beta tester
Estimable Member
Deelgenomen: 6 jaar geleden

I'm using UDP only. For EV4 you need GPRMC and PFLAA only, where as EV3 needs additional GPGSA for data accuracy. In

EV4 setup folder you find a file named PFMSWiFiExternalDevicesConnections.xml where you can check the ports used.

 

FLARM EV4
Beantwoorden
Berichten: 53
Topic starter
Estimable Member
Deelgenomen: 5 jaar geleden

Thanks. EV3 definitely works without GPGSA. I could not find the XML settings file you mentioned in /Android/data/com.pocketfms.easyvfr4/files. I dont have my tablet rooted, so I do not have access to data partition. I will experiment with UDP.

Jan

Beantwoorden
Berichten: 53
Topic starter
Estimable Member
Deelgenomen: 5 jaar geleden

I have created this very basic script to send UDP datagram and I am using perfectly valid NMEA sentence. Yet it does not show in EVFR4. May I know why please?

import socket
import time
UDP_IP = "127.0.0.1"
UDP_PORT = 2000
MESSAGE = "$PFLAA,0,0,-19555,1094,1,49D093!CSA922,215,,121,2880,0*57"
while True:
  print ("UDP target IP:", UDP_IP)
  print ("UDP target port:", UDP_PORT)
  print ("message:", MESSAGE)
  sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) # UDP
  sock.sendto(MESSAGE.encode('utf-8'), (UDP_IP, UDP_PORT))
  time.sleep(1)

Beantwoorden
Berichten: 75
Beta tester
Estimable Member
Deelgenomen: 6 jaar geleden

From my knowledge the format of PFLAA doesn't look correct.  I used FLARM DATA PORT SPECIFICATION Date: 2015-06-11

Try using following sentences:

$PFLAA,0,11130,3893,-1135,1,3D1212,92,0,42,0,8*2D
$PFLAA,0,-2993,1244,-1208,1,2B8765,124,0,67,0,8*0C
$PFLAA,0,9718,2215,-667,1,3C8B12,40,0,174,0,9*68
$PFLAA,0,13,7369,1762,1,3D0012,92,0,52,0,3*37
$PFLAA,0,13755,-470,521,1,3CACBB,104,0,45,0,1*1D

Beantwoorden
Berichten: 53
Topic starter
Estimable Member
Deelgenomen: 5 jaar geleden

Thanks very much. I used third sentence from your list and it does not work either. Maybe there should be some indication that connection to FLARM is active as written in some other post.

May I please ask for working script that I clould use for testing? It is Android device.

Thank you.

Beantwoorden
Berichten: 75
Beta tester
Estimable Member
Deelgenomen: 6 jaar geleden

All sentences above are correct and show traffic as expected.

This code https://github.com/transmitterdan/VDRplayer   runs fine using UDP and port 2000 reading attached file (unzip before using)

Beantwoorden
Berichten: 53
Topic starter
Estimable Member
Deelgenomen: 5 jaar geleden

Thank you. Do you use IP address 127.0.0.1? I have checked communication of EV4, it listens on 192.168.1.1, 1.2.3.4, 169.254.1.1, but never on 127.0.0.1. Could this be bug that FLARM IP setting are never considered? Thanks.

Beantwoorden
Berichten: 75
Beta tester
Estimable Member
Deelgenomen: 6 jaar geleden

Yap,  used 127.0.0.1  and is working as expected on Windows. Is port 2000 already used by other software? A port can only be opened once

Beantwoorden
Berichten: 469
Admin
Noble Member
Deelgenomen: 6 jaar geleden

Hi Jan,

I have asked our head developer Rob to take a look to this topic. He is currently quite busy with a huge beta release this week. After that, he can help you for sure.

In the meantime, have you tried port 4000? And do you have [Monitor for FLARM equipment ] enabled in EasyVFR 4? This needs to be enabled in order to let EV4 listen over TCP. You find it at [EasyVFR 4 menu] -> [System] -> [Electronic Conspicuity Settings].

Note that EV4 by default listens over UDP. That is a far more reliable connection. Enabling to Monitoring for FLARM equipment (via TCP) when not connected to FLARM equipment can result in unstable behaviour of the application. Best is to disable it when you do not need it.

 

Cheers,

Tim

Beantwoorden
Berichten: 75
Beta tester
Estimable Member
Deelgenomen: 6 jaar geleden

I did some more research on your code snippet. Following findings:

  1. traffic is not displayed in EV without current position, you need to add at least GPRMC to your transmission
  2.  you need to terminate your sentences with a line feed.
  3. "$PFLAA,0,0,-19555,1094,1,49D093!CSA922,215,,121,2880,0*57" is not a valid, check specifications mentioned earlier

The snippet below works fine in EV4 and EV3:

import socket
import time
UDP_IP = "127.0.0.1"
UDP_PORT = 2000
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) # UDP
print ("UDP target IP:", UDP_IP)
print ("UDP target port:", UDP_PORT) GPGSA = "$GPGSA,A,3,04,05,06,09,12,20,22,24,25,26,28,30,1,1,1,*02\r\n"
GPRMC = "$GPRMC,132615,A,5335.202,N,01007.0446,E,100,120,190420,1.48,W*67\r\n"
PFLAA = "$PFLAA,0,-4791,389,-50,1,3D0012,139,0,51,0,3*33\r\n" ## NOT_OK = "$PFLAA,0,0,-19555,1094,1,49D093!CSA922,215,,121,2880,0*57" while True:
print ("message:", GPGSA)
sock.sendto(GPGSA.encode('utf-8'), (UDP_IP, UDP_PORT))
print ("message:", GPRMC)
sock.sendto(GPRMC.encode('utf-8'), (UDP_IP, UDP_PORT))
print ("message:", PFLAA)
sock.sendto(PFLAA.encode('utf-8'), (UDP_IP, UDP_PORT)) ## print ("message:", NOT_OK)
## sock.sendto(NOT_OK.encode('utf-8'), (UDP_IP, UDP_PORT))
time.sleep(1)
Beantwoorden
Berichten: 53
Topic starter
Estimable Member
Deelgenomen: 5 jaar geleden

Hello Ubi, thanks for your help. I finally got it working. Compared with normal FLARM device, with my software emulator, I am even able to get position of small planes equipped with Mode-S transponder that do not broadca

st their position. Some observations for others:

  • EV4 does require both $GPGSA and $GPRMC sentences and requires correct checksum
  • EV4 always listens on UDP 127.0.0.1:2000 no matter what IP address is set in Electronic Conspicuity Settings.

Looks like I can now use EV4, great product.

a572167d 86ed 41f8 b81a df4684331d28
Beantwoorden
Berichten: 53
Topic starter
Estimable Member
Deelgenomen: 5 jaar geleden

Hello once again. I may have discovered a catch.

In the specifications of $PFLAA sentence the fourth parameter is relative altitude to the reference altitude (of your own airplane). Since reference altitude is (most probably) taken from external device in the similar way as reference position, from $GPRMC sentence, it is always zero, because $GPRMC does not contain altitude at all. 

So the displayed relative altitude of other traffic in EV4 is not correct, it is actually relative to 0ft AMSL. EV4 should add current altitude to relative altitude that it receives in $PFLAA.

What helped me is to add current altitude to value in $PFLAA before I send it to EV4 over UDP. Then the relative altitude of other traffic in EV4 is displayed correctly.

Jan

Beantwoorden
Berichten: 75
Beta tester
Estimable Member
Deelgenomen: 6 jaar geleden

Altitude is taken from GPGGA

Beantwoorden
Berichten: 53
Topic starter
Estimable Member
Deelgenomen: 5 jaar geleden

OK I have added emulation of $GPGGA sentence and EV4 now works fine. I am going to use it - how can I then change thread title from "Still unusable" to "Great evolution"? 🙂

By the way, is there any way how to properly EXIT the EV4? I did not find anything. When I want to restart it (because of tests of UDP I want to reset buffer), I just have to manually kill app in Android. This way sometimes destroy settings and I have to set everything again... So EXIT button that properly closes files would be very handy...

Beantwoorden
Berichten: 75
Beta tester
Estimable Member
Deelgenomen: 6 jaar geleden

@Jan

what specifications did you use for PFLAA? So far I did not know that <ID> can be extended with additional info like registration, type. Can you provide a doc or link for that?

Many thanks in advance

Ubi Sumus

Beantwoorden
Berichten: 53
Topic starter
Estimable Member
Deelgenomen: 5 jaar geleden

Hello Ubi,

I used specs that I found here. When I was messing up with my FLARM emulator for EV3, I discovered that the 8th parameter, Turn Rate, can be also string value and is displayed on the EV3 screen. It is same with EV4, so I am replacing turn rate with aircraft type and registration. If known, I also add destination airport after registration. The example is here:

$PFLAA,0,5956,7401,253,1,24624a53,107,P28A_OK-JIR_,43,0,0*

Jan

Beantwoorden
Berichten: 75
Beta tester
Estimable Member
Deelgenomen: 6 jaar geleden

Hello Jan,

many thanks for the link. I checked that, but I still could not find any details about extending the <ID> tag like you did in 49D093!CSA922.

No idea if 24624a53,107,P28A_OK-JIR_ is a generally valid option.

Ubi

Beantwoorden
1 reactie
Admin
Deelgenomen: 6 jaar geleden

Famed Member
Berichten: 1027

@ubi that ! mark is in the past "invented" by PilotAware if I recall correctly. Its no way a formal FLARM specification but Lee Moore lobbied a lot to get it implemented t o make callsigns possible

 

Beantwoorden
Berichten: 53
Topic starter
Estimable Member
Deelgenomen: 5 jaar geleden

Hello Ubi, specs for that 8th field say "The target’s turn rate. Positive values indicate a clockwise turn. Signed decimal value in °/s. Currently omitted.", so I am lucky that EV3 and EV4 accepts and displays any value or short string I put there.

If you are asking where I get aircraft type and registration, I can not disclose publicly, but I can tell you over whatsapp (+420.606.633.376).

Beantwoorden
Berichten: 75
Beta tester
Estimable Member
Deelgenomen: 6 jaar geleden

@Rob

many thanks for that, I'll implement it in easySim

Have a great WE

Beantwoorden
Mijn winkelwagen
Je winkelwagen is leeg.

Het lijkt erop dat je nog geen keuze hebt gemaakt.