Board index FlightGear Support Interfacing

Interfacing with UDP on localhost

Connecting two computers, using generic protocol, connecting with Matlab?

Interfacing with UDP on localhost

Postby mmyers7 » Thu Jul 04, 2019 2:30 pm

Hi All,

I'm working on a little project in which I am using the generic protocol to interface with and controlling FlightGear over UDP on the localhost network. Recently I have run into issues sending data from FlightGear. Listening with Wireshark and short python script I don't see an open connection like I used to.

A little more background, I am using the localhost IP for input and output with different port numbers for each. I vaguely remember reading on the Forum that you need different IP addresses and port numbers for each (not sure if that is true). I've tried several things with my XML file. I used to get an output with only one property in my XML, but no longer. The last thing I have tried is grabbing the exact XML from the Generic Protocol wiki page, but still no dice. Things starting going downhill when I was prototyping the input side. To rule that out I have removed all input capabilities.

Any thoughts on where I have gone wrong or things to try would be greatly appreciated.
mmyers7
 
Posts: 1
Joined: Tue Jun 04, 2019 12:29 am

Re: Interfacing with UDP on localhost

Postby wkitty42 » Thu Jul 04, 2019 3:37 pm

AIUI you only need different port numbers for input and output but that depends on the application... you would use the same IP number or host name either way... that's all i can offer at the moment...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 5721
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: Interfacing with UDP on localhost

Postby SurferTim » Sun Jul 07, 2019 10:14 am

wkitty42 is correct. You can use the same IP but you must use separate ports. Bind won't let you use a port twice. I use this for testing all the time.
Fly low, fly slow, land on a dime. Twin Otter.
SurferTim
 
Posts: 389
Joined: Sun Dec 09, 2018 5:49 pm
Location: Miramar Beach, FL
Callsign: Pirate
Version: 2019.2.0
OS: Ubuntu 18.04


Return to Interfacing

Who is online

Users browsing this forum: No registered users and 2 guests