NMEA data stream unreliable?

Moderators: Uros, Tom, OXO

Post Reply
FlyingSofa
Posts: 4
Joined: Tue May 19, 2020 6:43 am

NMEA data stream unreliable?

Post by FlyingSofa » Sun May 24, 2020 8:42 pm

Hello all!

I'm just getting into the world of virtual soaring here, and seeing XCSoar was free, and I have an old android tablet sitting around, I figured it might be nice to have a full-featured glide computer to play with. I followed some instructions about using com0com + hub4com to push NMEA data through a virtual serial connection over WIFI.

The good news is it's working! The bad news is that it seems to "flap" on and off every few seconds, which means that XCSoar isn't very useful, because it's only getting about half the flight, so while info like height AGL is accurate (When GPS is connected), all the more advanced features that I'd want to use it for are pretty much useless.

Has anyone had any experience with this, or have any tips they can share? Many apologies if this is the wrong place for the question.\

EDIT: Just in case it helps, I'm a virtual pilot _only_ for the time being, so there's no requirement that a solution here be portable to an actual aircraft/GPS system, anything that gets condor cleanly talking to XCSoar is fine. I thought about running XCSoar on my PC, but I don't know that its interface would work very well if I did that.
Image

janjansen
Posts: 1094
Joined: Wed Feb 24, 2016 9:26 pm

Re: NMEA data stream unreliable?

Post by janjansen » Sun May 24, 2020 9:39 pm

It works just fine. Im going to guess you did not disable the internal sensors of the tablet (in xcsoar device setup)? You are using xcsoar in "fly" mode rather than "sim" ?

FlyingSofa
Posts: 4
Joined: Tue May 19, 2020 6:43 am

Re: NMEA data stream unreliable?

Post by FlyingSofa » Sun May 24, 2020 9:53 pm

Yeah, that's what I thought too, but I've disabled the internal sensors, and I've been using XCSoar in "fly" mode.

The weird part is that it definitely _does_ work well when it works. When it's connected, XCSoar is getting Vario/Alt/GPS/etc from Condor, everything looks good, but it keeps cutting in and out. When it's not working, the entry under Devices shows "No Data".

I looked it the output of com0com and everything looks fine, no warnings or lost connections? Might windows or my router be messing with it?
Image

User avatar
Bre901
Posts: 1799
Joined: Tue Nov 22, 2016 8:57 pm
Location: Annecy (France)
Contact:

Re: NMEA data stream unreliable?

Post by Bre901 » Sun May 24, 2020 10:21 pm

I guess the problem comes from the gateway between the COM port and XCSoar.

I have never tried com0com + hub4com, but I've been using HW VSP3 for some time now and when the connection is established, it is very stable

Just take a look a the manual : Appendix 5 - External PDA
https://www.condorsoaring.com/manual_en/
CN: MPT — CondorUTill webpage: https://condorutill.fr/

FlyingSofa
Posts: 4
Joined: Tue May 19, 2020 6:43 am

Re: NMEA data stream unreliable?

Post by FlyingSofa » Sun May 24, 2020 11:05 pm

I tried using VSP3, following the given instructions, but I get the same issue. It seems like data is only coming in every couple of seconds.

EDIT: I think I've fixed it. It seems to work okay when XCSoar is running on my phone. My old tablet is just too old and busted it seems :)
Image

FlyingSofa
Posts: 4
Joined: Tue May 19, 2020 6:43 am

Re: NMEA data stream unreliable?

Post by FlyingSofa » Mon May 25, 2020 1:08 am

Disregard previous post, problem showed up on the phone as well. I'll mess with this another time, I've been spending all day troubleshooting instead of soaring :)
Image

janjansen
Posts: 1094
Joined: Wed Feb 24, 2016 9:26 pm

Re: NMEA data stream unreliable?

Post by janjansen » Mon May 25, 2020 7:33 am

Thats odd. Ive used xcsoar on the same PC, on various phones and tablets, via bluetooth and wifi, with vspe and hw vps3 and never really had anything similar.

Now NMEA data out is a slow. Something like once per second, so you cant really use the vario functions of xcsoar, but its perfectly fine for navigation. . Also whenever you pause condor, NMEA is stopped. But again, thats hardly a problem.

Here is what I would do; connect a serial terminal to the com port on the PC. Something like RealTerm. Keep it open on a second screen if you can, or put condor in windowed mode for testing. You could also use xcsoar on PC and monitor the port in xcsoar (it has a built in com port monitor), for reference, this is what it looks like on my pc:

Image

Image

It updates every second like clockwork.

If the NMEA is not interrupted there, then it rules out a problem with condor and the virtual serial port, which pretty much only leaves your WIFI connection as culprit. Or something interfering with the wifi connection (firewall, antivirus, IP address conflict ?). If the data is flaky on the com port, report back what you see on the terminal.

janjansen
Posts: 1094
Joined: Wed Feb 24, 2016 9:26 pm

Re: NMEA data stream unreliable?

Post by janjansen » Mon May 25, 2020 8:30 am

I forgot to say, to run it on the same PC, you need a local serial connector. com0com does that I believe, and you just dont run hub4com, but I havent used that in ages, I could be wrong. I use VSPE for that, and then connect directly to the COM port, but you may also be able to use VSP3 or hub4com and just connect to a TCP port on the local IP address. That may also be helpful in trouble shooting: first using serial COM port only , if that works, use serial over TCPIP locally, if that works, try it via wifi.

Xavier
Posts: 622
Joined: Fri Jun 20, 2008 2:22 pm
Location: France

Re: NMEA data stream unreliable?

Post by Xavier » Mon May 25, 2020 1:49 pm

Hi,

I am new with XCSoar and VSPE, but I make few findings during the Coronavirus confinement.

But, now I can use XCSoar working on my WiFi Tablet, my PC, with CondorNav and CoTASA, all together in multiplayer.

It is a little bit tricky, and as always it is a question of method.

First I configure VSPE Condor XCSoar and I follow this order (Note the use of increasing number for COM):

1/ I create a "Pair" to connect Condor2 and VSPE with COM2 for Condor and COM4 as Virtual devices.
2/ I create a "Splitter" to connect COM4 and COM5 where I can bind all the devices on my PC (XCSoar, CondorNav, CoTASA) and on my Wifi Tablet (Xcsoar)
3/ I go back to the set up of Condor2, where I can enable NMEA output with COM2.
4/ With this configuration all the Condor2 applications on my PC work fine, if they are Configured with COM5.
5/ I note the IP of my tablet, something like 192.168.1.xx (The last number XX of the IP can change sometime)
6/ In XCSoar of my tablet, I configure A device with a TCP port (port 4353) and with the pilot "Condor Soaring Simultor". All the other devices must be deactivated.
7/ I come back to VSPE and I create a new device "TcpClient" with the IP Tablet as The "Remote TCP Host" and 4353 as the "Remote TCP port". The source is obviously COM5 of the Splitter, and I use 19200 bauds as Speed.
I save this new configuration of VSPE.

8/ I stop and start my PC and I start my devices in this order.
- 1/ VSPE with the last configuration.
- 2/ XCSoar (tablet and/or PC).
- 3/ Condor2 until the glider on the start line of the airport. At this time the VSPE must look like that with the 3 devices OK:


VSPEConfigMulti.JPG


- 4/ CondorNav.
- 5/ CoTASA.

The proof:


Proof.jpg


@ Janjansen: Can you explain why you prefer a low rate of 4800 bauds, I use 19200 with no issue, I probably miss something?

I hope that this topic will help!
You do not have the required permissions to view the files attached to this post.
*****- Xavier - (XDL - VR FAN) *****

janjansen
Posts: 1094
Joined: Wed Feb 24, 2016 9:26 pm

Re: NMEA data stream unreliable?

Post by janjansen » Mon May 25, 2020 2:39 pm

The baudrate you select in xcsoar makes no difference. You can set it to 300 or 200K in a serial monitor or xcsoar, nothing changes.
Condor is hardcoded to 1 Hz update frequency and afaik simulates 4800 baud. Selecting anything higher only impacts the communication between xcsoar and the com port emulator, it does nothing for the data coming from condor.

Xavier
Posts: 622
Joined: Fri Jun 20, 2008 2:22 pm
Location: France

Re: NMEA data stream unreliable?

Post by Xavier » Mon May 25, 2020 8:28 pm

Hi Janjansen

Thank you for your quick answer.
I will make some test with 4800 bauds.
Regards
*****- Xavier - (XDL - VR FAN) *****

Post Reply