Together we make EasyVFR

Notifications
Clear all

[Solved] Still unusable - missing connectivity to emulated FLARM

31 Posts
5 Users
0 Likes
1,818 Views
Posts: 53
Beta tester
Topic starter
Trusted Member
Joined: 5 years ago

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

30 Replies
Posts: 62
Beta tester
Trusted Member
Joined: 5 years ago

Hello Jan,

 

what devices are you using?

 

Happy Landings

Ubi Sumus

Reply
6 Replies
Beta tester
Joined: 5 years ago

Trusted Member
Posts: 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

Reply
Jörg Walther
Beta tester
Joined: 5 years ago

Eminent Member
Posts: 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

Reply
Admin
Joined: 5 years ago

Noble Member
Posts: 995

@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

Reply
Jörg Walther
Beta tester
Joined: 5 years ago

Eminent Member
Posts: 17

@rob-weijers

OK, thanks Rob.

Reply
Jörg Walther
Beta tester
Joined: 5 years ago

Eminent Member
Posts: 17

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

Reply
Beta tester
Joined: 5 years ago

Trusted Member
Posts: 53

@ubi

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

Reply
Posts: 62
Beta tester
Trusted Member
Joined: 5 years ago

@Jan

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

Reply
1 Reply
Beta tester
Joined: 5 years ago

Trusted Member
Posts: 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

 

Reply
Posts: 53
Beta tester
Topic starter
Trusted Member
Joined: 5 years ago

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

Jan

Reply
Posts: 62
Beta tester
Trusted Member
Joined: 5 years ago

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
Reply
Posts: 53
Beta tester
Topic starter
Trusted Member
Joined: 5 years ago

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

Reply
Posts: 53
Beta tester
Topic starter
Trusted Member
Joined: 5 years ago

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)

Reply
Posts: 62
Beta tester
Trusted Member
Joined: 5 years ago

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

Reply
Posts: 53
Beta tester
Topic starter
Trusted Member
Joined: 5 years ago

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.

Reply
Posts: 62
Beta tester
Trusted Member
Joined: 5 years ago

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)

Reply
Posts: 53
Beta tester
Topic starter
Trusted Member
Joined: 5 years ago

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.

Reply
Posts: 62
Beta tester
Trusted Member
Joined: 5 years ago

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

Reply
Posts: 452
Admin
Honorable Member
Joined: 6 years ago

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

Reply
Posts: 62
Beta tester
Trusted Member
Joined: 5 years ago

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)
Reply
Posts: 53
Beta tester
Topic starter
Trusted Member
Joined: 5 years ago

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
Reply
Posts: 53
Beta tester
Topic starter
Trusted Member
Joined: 5 years ago

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

Reply
Posts: 62
Beta tester
Trusted Member
Joined: 5 years ago

Altitude is taken from GPGGA

Reply
Posts: 53
Beta tester
Topic starter
Trusted Member
Joined: 5 years ago

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...

Reply
Posts: 62
Beta tester
Trusted Member
Joined: 5 years ago

@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

Reply
Posts: 53
Beta tester
Topic starter
Trusted Member
Joined: 5 years ago

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

Reply
Posts: 62
Beta tester
Trusted Member
Joined: 5 years ago

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

Reply
1 Reply
Admin
Joined: 5 years ago

Noble Member
Posts: 995

@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

 

Reply
Posts: 53
Beta tester
Topic starter
Trusted Member
Joined: 5 years ago

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).

Reply
Posts: 62
Beta tester
Trusted Member
Joined: 5 years ago

@Rob

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

Have a great WE

Reply
My cart
Your cart is empty.

Looks like you haven't made a choice yet.