Board index FlightGear Release candidates 2.10

FG 2.10.0 rc2 generic protocol & telnet problem

This is the archive of topics about the 2.10 release candidates.

FG 2.10.0 rc2 generic protocol & telnet problem

Postby serhat » Wed Feb 06, 2013 3:21 pm

Hi,
I have FG 2.10.0 rc2 64-bit installed at d:\FlightGear-2.10 on windows 7 64-bit with a radeon card.

I am running FG with the following:
set FG_HOME=d:\FlightGear-2.10
set FG_ROOT=%FG_HOME%\data
%FG_HOME%\bin\win64\fgfs --httpd=5055 --telnet=5056 --generic=socket,out,30,,5051,tcp,bintest --aircraft=bo105 --disable-real-weather-fetch --timeofday=noon --geometry=1024x768


FG starts nicely but on the console I am getting:
No internationalization settings specified in preferences.xml
Httpd server started on port 5055
Error: connect() failed in make_client_socket()
SG_IO_OUT socket creation failed
Error opening channel communication layer.
I/O Channel config failed.


httpd seems to be working and is available at localhost:5055. On FG 2.8.0.5 with the same commandline, just after the "Httpd server..." line I am seeing
Property server started on port 5056
So even if the telnet functionality is successfully started, it is not mentioned on the console with FG 2.10.0 rc2.

The other problem I am having with FG 2.8.0.5 and 2.10.0 rc2 is, I am not able to get any aircraft state from FG with any generic protocol (fgcom, bintest or my own) on tcp or udp...
serhat
 
Posts: 7
Joined: Fri Feb 01, 2013 2:34 pm

Re: FG 2.10.0 rc2 generic protocol & telnet problem

Postby Hooray » Wed Feb 06, 2013 4:20 pm

if the socket connect call fails, your server wasn't running/available/reachable (=listening) at the time of making that connection attempt. Start your server prior to FG. For testing purposes, use netcat or python to start a simple tcp server on the desired port

otherwise, you'd have to use a "connection-less" protocol like UDP instead.

To check if telnet/props support is enabled and running, use a telnet client such as putty on Windows (make sure to enable TELNET mode and NOT to use SSH mode)
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11354
Joined: Tue Mar 25, 2008 8:40 am

Re: FG 2.10.0 rc2 generic protocol & telnet problem

Postby serhat » Thu Feb 07, 2013 8:51 am

Hooray wrote:if the socket connect call fails, your server wasn't running/available/reachable (=listening) at the time of making that connection attempt. Start your server prior to FG. For testing purposes, use netcat or python to start a simple tcp server on the desired port

this solved the communication problem. i thought FG is the server, not the client. Is this documented anywhere? did i miss it? thx..

Now, i have another problem: The data comes in the range of 1e-312 (very small but it changes). i think there is a byte-order (endianness) problem.. I am running both FG and my "listening server" on an intel pc. Is there any endianness operation on the FG side for binary generic protocol field values (like altitude) ? I am receiving about a dozen fields as doubles (altitude, latitude, velocities, rates, etc.).

Note: I have also written a fake FG that just sends 1.0, 2.0, 3.0 as doubles and I am not having endianness issues with the fake FG program..
Note 2: I am using binary_footer, and I am checking both data size and the footer field for correct reception of a data pack.. I am continuously receiving correct data packs from FG and my fake FG. Just that the data from FG seems to be endian-incorrect..
serhat
 
Posts: 7
Joined: Fri Feb 01, 2013 2:34 pm

Re: FG 2.10.0 rc2 generic protocol & telnet problem

Postby Hooray » Thu Feb 07, 2013 9:23 am

I didn't check the docs, so I don't know if this is mentioned anywhere or not.

But you said you'd use TCP (which is NOT connection-less), the error message is pretty clear about the connect() call not succeeding. A server runs listen() and then accept(). So FG complaining about connect() not succeeding says "could not connect" (to a listening server in this case).

But I agree that we can/should improve the docs, please consider registering at our wiki at http://wiki.flightgear.org to help update the docs.
You can also help update the docs in $FG_ROOT/Docs by filing a merge request via gitorious.
Another option would be modifying the error message such that it says "(start your server first!)".

Finally, please try to proceed step by step, first of all ensure that existing features/protocols are working before trying your own stuff. In $FG_ROOT/Protocol you'll find bintest.xml

For additional info see:
http://www.mail-archive.com/flightgear- ... 03542.html
http://www.mail-archive.com/flightgear- ... 12490.html

Your help in updating the docs would obviously be appreciated.
There's tons of stuff not yet mentioned in the docs, see: http://www.mail-archive.com/search?l=fl ... ry+generic
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11354
Joined: Tue Mar 25, 2008 8:40 am

Re: FG 2.10.0 rc2 generic protocol & telnet problem

Postby serhat » Thu Feb 07, 2013 12:48 pm

Hooray wrote:But you said you'd use TCP (which is NOT connection-less), the error message is pretty clear about the connect() call not succeeding. A server runs listen() and then accept(). So FG complaining about connect() not succeeding says "could not connect" (to a listening server in this case).

good logic :D thx..
Hooray wrote:But I agree that we can/should improve the docs, please consider registering at our wiki at http://wiki.flightgear.org to help update the docs.
You can also help update the docs in $FG_ROOT/Docs by filing a merge request via gitorious.
Another option would be modifying the error message such that it says "(start your server first!)".

Your help in updating the docs would obviously be appreciated.
There's tons of stuff not yet mentioned in the docs, see: http://www.mail-archive.com/search?l=fl ... ry+generic

i'll register and edit the wiki..
serhat wrote:Note: I have also written a fake FG that just sends 1.0, 2.0, 3.0 as doubles and I am not having endianness issues with the fake FG program..
Note 2: I am using binary_footer, and I am checking both data size and the footer field for correct reception of a data pack.. I am continuously receiving correct data packs from FG and my fake FG. Just that the data from FG seems to be endian-incorrect..

ok i think i have identified the problem:
Looking at http://gitorious.org/fg/flightgear/blob ... eneric.cxx line 660, adding <byte_order>host</byte_order> will do it..
serhat
 
Posts: 7
Joined: Fri Feb 01, 2013 2:34 pm


Return to 2.10

Who is online

Users browsing this forum: No registered users and 0 guests