CONDOR

The Competition Soaring Simulator
It is currently Wed Jun 19, 2013 4:18 pm

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 58 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
PostPosted: Fri Apr 15, 2011 6:08 pm 
Offline

Joined: Sat Dec 17, 2005 8:47 pm
Posts: 510
[edit: Added links to 64-bit com0com installation files]

This guide covers how to use Condor and XCSoar for Android over the same wireless network, avoiding the need for a Bluetooth link.

Please note:
-This functionality requires XCSoar 6.1 or later.

-Using Condor and XCSoar for Android over a USB link is possible but requires extra software (TCP forwarding over Android Debug Bridge) - the extra steps required will be added to this guide when time permits.

-This functionality should be available for Windows / Windows CE devices in future (connecting over Wifi or ActiveSync) in a matter of weeks. This guide will be amended with the steps required. when it is possible.

Software required is all free, open-source:

On Android device:

XCSoar 6.1 or later

On PC:
com0com virtual serial port driver
hub4com virtual serial port -> tcp utility

INSTALLATION

1) Install XCSoar 6.1 alpha from 'XCSoar-testing' on the Android market.

2) Download com0com from
http://sourceforge.net/projects/com0com ... p/download (32 bit PC) or
http://sourceforge.net/projects/com0com ... p/download (64 bit PC)
If you don't know which you have, it's probably 32 bit :)

a: Extract ZIP file to a temporary directory and run setup.exe

b: Leave 'Start Menu Shortcuts' and 'CNCA0<->CNCB0' options ticked
c: Install to a directory of your choice.
d: Untick 'Launch Setup Command Prompt' and 'Show Readme'
e: Finish
f: (Remove temporary directory)

3) Download hub4com from
http://sourceforge.net/projects/com0com ... p/download

a: To install, extract contents of ZIP file to a directory of your
choice (Example C:\Program Files\hub4com)

CONFIGURATION

1) Configure the flight simulation software

a: Set windowed display mode for testing.
Condor: Enter Condor's 'Setup' screen and select 'Windowed'. Set
screen resolution to something low (eg 800x600)

b: Enable NMEA output
Condor: Go to the 'Options' page and in the 'NMEA output' frame, tick
'Enable'. Under 'Port', select 'CNCA0'

2) Obtain your Android device's IP address on the network

a: On your Android device, go to the Android Settings page.

b: Choose the 'Wireless & Networks' option.

c: Verify that 'Wi-Fi' is ticked and that you are connected to the wifi network.

d: Choose 'Wi-Fi settings'

e: In the 'Wi-Fi networks' list, the top entry is the network you are
currently connected to. Tap on it to bring up an information list.

f: Note down the IP address eg 192.168.1.100

3) Configure XCSoar

a: Start XCS-test from the application list

b: Enter 'FLY' mode

c: Double-tap on the center of the screen to bring up the XCSoar menu

d: Tap on 'Config' to display the first page of the Config Menu

e: Tap on 'Config' again to display the second page of the Config menu

f: Tap on 'System Setup'

g: Advance using the arrow buttons to Page 14 'Devices'

h: Configure XCSoar to use Condor as the secondary data source:

- Change 'Device B Name' to 'Condor'
- Under 'Device B Port' select 'TCP Port 4353' (Note: If the number is
not 4353, note it down and use it instead of 4353 later in this
guide)

If you will only use this device with a simulator:

- Under 'Device A Port' choose 'Disabled'.

If you use XCSoar with a real GPS source:

- Keep Device A settings for your real GPS, eg. 'Name: Generic, Port: Built-in GPS'

4) Configure hub4com to connect to your Android device

a: Using Windows Explorer, open the directory you extracted hub4com to.

b: Right click com2tcp.bat and select 'Create shortcut'

c: Right click the shortcut and look for the 'Target' field, which
contains the path to your com2tcp.bat file, eg "C:\Program
Files\hub4com\com2tcp.bat"

d: Append (add to the end) the following text to the 'Target' field:

\\.\CNCB0 ipaddress.of.android.device 4353

The complete target field should read something like:

"C:\Program Files\com2tcp\com2tcp.bat" \\.\CNCB0 192.168.1.100 4353

e: Click OK to save the changes to the shortcut properties.

f: (Optional) Copy the shortcut to a more accessible place.

USING

On Android device:

-Enable Wifi
-Start XCS-Test

On PC:

-Run the shortcut you created to com2tcp.bat.

A black console window should appear with similar appearance to:

Code:
C:\Program Files\hub4com>"hub4com"     --create-filter=pin2con --add-filters=0:p
in2con     "\\.\CNCB0" --use-driver=tcp --reconnect=1000 "192.168.1.100:4353"
Open("\\.\CNCB0", baud=19200, data=8, parity=no, stop=1, octs=on, odsr=off, ox=o
ff, ix=off, idsr=off, ito=0) - OK
Route data CNCB0(0) --> TCP(1)
Route data TCP(1) --> CNCB0(0)
Route flow control CNCB0(0) --> TCP(1)
Route flow control TCP(1) --> CNCB0(0)
Filters:
_________
         \->{pin2con.IN}->
CNCB0(0) |      /
_________/<---------------

CNCB0(0) Event(s) 0x10 [DSR] will be monitired
Started CNCB0(0)
Started TCP(1)


-Run Condor (check you completed the configuration earlier in this guide) and start a flight in a PDA-equipped aircraft.

If Condor is running in windowed mode, you may notice messages such as this appearing in the console window:

Code:
Socket(0.0.0.0:0) = 760
Connect(760, 192.168.1.100:4353) ...


This means that Condor has opened the port for NMEA data and com2tcp.bat is attempting to connect to the Android device.

As soon as the Condor flight begins, the 'GPS not connected' icon should disappear in XCSoar and the position of the aircraft in Condor should be displayed.

CLOSING
-------

The com2tcp.bat window can be left open or closed at any time. If a Condor flight is active it will periodically try to connect to the Android device. If no Condor flight is active, com2tcp.bat is inactive.

TROUBLESHOOTING

This guide was tested on 32-bit Windows XP, and users have reported success on 64-bit Windows 7 also. Please report any problems with this or other configurations.

If you have problems, double-check the IP address and ports. If connection still does not work, please capture the contents of the com2tcp.bat console window:

Right click on the main body of the black console window titled 'com2tcp.bat'.
Select 'Select All', all the text should be highlighted in white.
Then right click again on any of the highlighted area to copy the text to clipboard.

Paste the text into a reply here.


Last edited by staylo on Mon Nov 07, 2011 10:53 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Sun Jun 19, 2011 4:57 pm 
Offline

Joined: Sat Jan 21, 2006 4:10 pm
Posts: 1
Thanks for the interesting thread, any chance of accomplishing this same task on a 64-bit Windows installation?

Mike


Top
 Profile  
 
PostPosted: Wed Jun 22, 2011 10:52 am 
Offline

Joined: Sat Dec 17, 2005 8:47 pm
Posts: 510
Good question, unfortunately I've not been able to test any other configuration. There's a 64 bit installation of com0com available from http://sourceforge.net/projects/com0com ... p/download

Other than that the steps should hopefully be the same.


Top
 Profile  
 
PostPosted: Thu Jun 30, 2011 11:38 am 
Offline

Joined: Tue May 22, 2007 12:45 pm
Posts: 4
After spending frustrating hours trying to get a bluetooth connection running I gave the Wifi connection a try. It works as advertised with a Dell Streak and Windows XP!


Top
 Profile  
 
PostPosted: Sat Aug 27, 2011 4:10 pm 
Offline

Joined: Sat Sep 06, 2008 1:39 pm
Posts: 7
Any luck with getting it to work over USB?

_________________
Image


Top
 Profile  
 
PostPosted: Sun Sep 04, 2011 4:46 pm 
Offline

Joined: Sat Dec 17, 2005 8:47 pm
Posts: 510
Not currently, I ran out of time again. Some weeks ago I worked on an automated installer that downloads the required software and then performs the steps described in this guide automatically, and will hopefully modify this to include the USB connection for Android.


Top
 Profile  
 
PostPosted: Sat Oct 01, 2011 3:18 pm 
Offline

Joined: Fri Jul 25, 2008 11:57 pm
Posts: 13
Thank you for this great explanation how to set this up. Working great here
I use:
PC, Windows 7 Home, 64 bit.
Samsung Galaxy Mini, Android version 2.2.1

_________________
Image


Top
 Profile  
 
PostPosted: Thu Nov 03, 2011 3:11 am 
Offline

Joined: Tue Mar 29, 2011 11:48 am
Posts: 10
Thanks heaps, works as advertised!
Using:
Dell Streak (Custom ROM, Gingerbread 2.3.3)
Windows XP
XCSoar 6.2.1


Top
 Profile  
 
PostPosted: Mon Nov 07, 2011 4:15 am 
Offline

Joined: Wed Jul 29, 2009 11:57 pm
Posts: 8
Just wanted to report that I had success in Win7 64 bit using this method, but substituting the com0com with the 64 bit version here http://sourceforge.net/projects/com0com ... p/download and noted earlier in this thread. Also worked on my XP 32 bit laptop. ... akiley


Top
 Profile  
 
PostPosted: Mon Nov 07, 2011 10:53 am 
Offline

Joined: Sat Dec 17, 2005 8:47 pm
Posts: 510
Thanks for the feedback! I've edited the original post.


Top
 Profile  
 
PostPosted: Mon Nov 07, 2011 5:15 pm 
Offline

Joined: Thu Nov 05, 2009 12:47 am
Posts: 11
Works fine for me too :D

My setup:
32bit Windows XP
Samsung Galaxy
XCSoar 6.2

Great achievment and very easy to use. Thanks a lot!


Top
 Profile  
 
PostPosted: Tue Nov 08, 2011 1:35 am 
Offline

Joined: Thu Dec 16, 2010 12:47 am
Posts: 24
I have a problem...


D:\!flight sim\Condor_The_ Competition_Soaring_Simulator\XCsoar\hub4com-2.0.0.0-
386\hub4com-2.0.0.0-386>"hub4com" --create-filter=pin2con --add-filters=0:pi
n2con "\\.\COM5" --use-driver=tcp --reconnect=1000 "192.168.1.64:4353"
Open("\\.\COM5", baud=19200, data=8, parity=no, stop=1, octs=on, odsr=off, ox=of
f, ix=off, idsr=off, ito=0) - OK
Route data COM5(0) --> TCP(1)
Route data TCP(1) --> COM5(0)
Route flow control COM5(0) --> TCP(1)
Route flow control TCP(1) --> COM5(0)
Filters:
________
\->{pin2con.IN}->
COM5(0) | /
________/<---------------

COM5(0) Event(s) 0x10 [DSR] will be monitired
Started COM5(0)
Started TCP(1)
Socket(0.0.0.0:0) = 774
Connect(774, 192.168.1.64:4353) ...
ReadOverlapped::StartRead(): ReadFileEx(774) TCP(1) ERROR Unknown error (59)
WriteOverlapped::StartWrite(): WriteFileEx(774) TCP(1) ERROR Unknown error (59)
Connect(774) TCP(1) ERROR Unknown error (10060)
Close(774) - OK
Socket(0.0.0.0:0) = 768
Connect(768, 192.168.1.64:4353) ...
Write lost TCP(1): 358, total 358
ReadOverlapped::StartRead(): ReadFileEx(768) TCP(1) ERROR Unknown error (59)
WriteOverlapped::StartWrite(): WriteFileEx(768) TCP(1) ERROR Unknown error (59)
Connect(768) TCP(1) ERROR Unknown error (10060)
Close(768) - OK
Write lost TCP(1): 179, total 537
Socket(0.0.0.0:0) = 758
Connect(758, 192.168.1.64:4353) ...


Any ideas


Top
 Profile  
 
PostPosted: Tue Nov 08, 2011 4:43 am 
Offline

Joined: Wed Jul 29, 2009 11:57 pm
Posts: 8
akiley wrote:
Just wanted to report that I had success in Win7 64 bit using this method, but substituting the com0com with the 64 bit version here http://sourceforge.net/projects/com0com ... p/download and noted earlier in this thread. Also worked on my XP 32 bit laptop. ... akiley


To add to my Win7 64 bit success, I'd like to note a few areas people may stumble on. Also, I don't think we need XCSoar "test" because we're up to a stable version with 6.2 and beyond.

The part of the instructions that say:

c: Right click the shortcut and look for the 'Target' field, which
contains the path to your com2tcp.bat file, eg "C:\Program
Files\hub4com\com2tcp.bat"

THE ABOVE LEFT OUT THE WORD "PROPERTIES" AND SHOULD READ:

c: Right click the shortcut, hit properties and look for the 'Target' field, which
contains the path to your com2tcp.bat file, eg "C:\Program
Files\hub4com\com2tcp.bat"

Also note that when you append to the target like this "C:\Program Files\com2tcp\com2tcp.bat" \\.\CNCB0 192.168.1.100 4353 there is a space after the " and before the \\. Also note the CNCB0 ends in a zero, not the letter O. If you mess anything up in this line like I did, you get a target not found error when you close it.

Lastly, I've read that Condor can be a little buggy sending out NMEA data. When I used a serial cable it wouldn't work, while the same serial conection worked in X-Plane. Then it suddenly kicked in a week later. I've heard other reports of this as well. So if it doesn't work initially, recheck all your setting then try again.

akiley


Top
 Profile  
 
PostPosted: Tue Nov 08, 2011 10:04 pm 
Offline

Joined: Fri Jul 25, 2008 11:57 pm
Posts: 13
"Lastly, I've read that Condor can be a little buggy sending out NMEA data. When I used a serial cable it wouldn't work, while the same serial conection worked in X-Plane. Then it suddenly kicked in a week later. I've heard other reports of this as well. So if it doesn't work initially, recheck all your setting then try again."

I have notice this problem as well when using my PDA but never when I am using my Android device tough, not yet at least.
When times comes when I don't get any NMEA data from Condor I have to unplug my PDA from the PC, restart it and then start up Condor before starting XCSoar again.

Daniel

_________________
Image


Top
 Profile  
 
PostPosted: Wed Nov 09, 2011 12:27 am 
Offline

Joined: Wed Jul 29, 2009 11:57 pm
Posts: 8
spoinn wrote:
"Lastly, I've read that Condor can be a little buggy sending out NMEA data. When I used a serial cable it wouldn't work, while the same serial conection worked in X-Plane. Then it suddenly kicked in a week later. I've heard other reports of this as well. So if it doesn't work initially, recheck all your setting then try again."

I have notice this problem as well when using my PDA but never when I am using my Android device tough, not yet at least.
When times comes when I don't get any NMEA data from Condor I have to unplug my PDA from the PC, restart it and then start up Condor before starting XCSoar again.

Daniel


Today an odd thing happened. When I had Condor running then started my Droid X, I would be in the wrong area yet my glider icon was responding correctly to my turns. I wonder if I was getting some of my real GPS interacting because it was my current location. Anyway, I turned off the GPS in the XCSoar setup page 15 for the first device and that fixed it. It was page 14, now 15 in the newer version of XCSoar. ... akiley


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 58 posts ]  Go to page 1, 2, 3, 4  Next

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group