Jump to content

[PLUGIN, PART, 0.15+] crxTelemetryMk2 Module alpha


Corax

Recommended Posts

I\'m using the latest build and default options with the part.

Got everything in the right folders and things.

Run mono with UDPReceiver

But it\'s stopped at waiting for client.

It doesn\'t appear to want to transmit data over IP.

I\'m running KSP 14.4 and the lastest files downloaded from post 1.

On MacOSX (lion)

Any thoughts?

Update: tested with ncat nothing transmitted/recieved

Update 2: Tested with the outdated version. Still no joy :-(

Link to comment
Share on other sites

I\'m using the latest build and default options with the part.

Got everything in the right folders and things.

Run mono with UDPReceiver

But it\'s stopped at waiting for client.

It doesn\'t appear to want to transmit data over IP.

I\'m running KSP 14.4 and the lastest files downloaded from post 1.

On MacOSX (lion)

Any thoughts?

Update: tested with ncat nothing transmitted/recieved

Have you tried the included \'2-X Sounding Rocket\'? If you have built your own rocket, have you activated the module? In the VAB, pull the module\'s icon (it\'s the same as the tricoupler icon, so make sure you catch the right one) into the lowest stage so it gets activated right when you launch the rocket, or put it into its own dedicated stage and pull that all the way down.

Please verify your firewall does not block localhost:54345 or 127.0.0.1:54345.

A file called \'[tt]telemetry.data[/tt]\' should be created in the directory you launch UDPReceiver from. If it\'s there, what are its contents?

Apart from that, check that you have the latest ([tt]2012-04-08-crxTelemetry.tgz[/tt]), not the last ([tt]OUTDATED-2012-03-19-crxTelemetry-OUTDATED.tgz[/tt]) file from the OP ;)

Link to comment
Share on other sites

I\'ve used the 2-X Sounding Rocket.

telemetry.data is blank.

Resetting to lastest now.

I have no firewall currently enabled

Update: http://www.evernote.com/shard/s45/sh/4fb139ea-d00b-4f1c-8503-e496c497703c/00ba75751f43c5b01356ee981a4b1ad0

Update: the icon is red upon activation..... if that helps

Update:

Having read the source.

It seems my 'transmissionquality' is less that 3. So its offline?

Keh?

Update:

I found unitys log.

e_print: Activate(): Invalid Arguments.

Link to comment
Share on other sites

I\'ve used the 2-X Sounding Rocket.

telemetry.data is blank.

Resetting to lastest now.

I have no firewall currently enabled

There is no such thing as \'lastest\', it\'s either last or latest; in this case, the most recent file is the first of the four attachments. The last, i.e. fourth attachment, is outdated. Make sure you have the first, i.e. latest ;)
Sorry, can\'t make out anything on this site.

Update: the icon is red upon activation..... if that helps

Update:

Having read the source.

It seems my 'transmissionquality' is less that 3. So its offline?

Keh?

That basically just confirms what you said in your first post, that you don\'t receive anything. It tries to go online, but apparently cannot find a receiver.

Maybe you could edit the part.cfg from

ipAddress = 127.0.0.1

to

ipAddress = localhost

and see if that helps...

I think it shouldn\'t make a difference, but try starting the UDPReceiver (or ncat) before you activate the telemetry module.

Link to comment
Share on other sites

Sorry I mistyped.

I am using latest.

I updated my post as you responded.

I have tried ncat and udpreciever before starting KSP. No joy

I now have found unity/KSP logs:

(crxTelemetryLib.Transmitter) e_print: Activate(): Invalid Arguments.

I\'ve tried localhost. No joy same log entry

Link to comment
Share on other sites

Sorry I mistyped.

I am using latest.

I updated my post as you responded.

I have tried ncat and udpreciever before starting KSP. No joy

No problem, it just wasn\'t completely clear... ;)

I now have found unity/KSP logs:

(crxTelemetryLib.Transmitter) e_print: Activate(): Invalid Arguments.

I\'ve tried localhost. No joy same log entry

It looks as if somehow the IP address can not be resolved or interpreted correctly (and I\'m to blame for not making it fail gracefully). I doubt it, but maybe there is some more info in the ALT-F2 console in game.

If you know the IP address of your network card, you could try that in the part.cfg.

If all else fails you could try and download the outdated version and see if that works... best make a copy of a fresh installation of KSP and experiment off that.

Link to comment
Share on other sites

I tried the local IP of the network card.

No joy there.

ALT F2 spits out the same as the unity log.

I\'ve even tried both with the wifi on and off.

Currently the machine in question is completely isolated from the network.

I might download monodevelop and adjust the line to see what is being passed to it rather than just throwing 'invalid arguments'

Link to comment
Share on other sites

Finally got around to adjusting it and building it.

For some reason the IP passed to the Socket Spawner in

IP: ::0.0.0.1

Seems something borked...

(crxTelemetryLib.Transmitter) e_print: IP: ::0.0.0.1

(Filename: /Applications/buildAgent/work/b0bcff80449a48aa/Runtime/ExportGenerated/MacStandalonePlayer/UnityEngineDebug.cpp Line: 43)

(crxTelemetryLib.Transmitter) e_print: PORT: 54345

(Filename: /Applications/buildAgent/work/b0bcff80449a48aa/Runtime/ExportGenerated/MacStandalonePlayer/UnityEngineDebug.cpp Line: 43)

(crxTelemetryLib.Transmitter) e_print: Activate(): Invalid arguments

(Filename: /Applications/buildAgent/work/b0bcff80449a48aa/Runtime/ExportGenerated/MacStandalonePlayer/UnityEngineDebug.cpp Line: 43)

I changed

e_print ('PassedIP: ' + _ipAddress);

System.Net.IPHostEntry remoteHost = System.Net.Dns.GetHostEntry (_ipAddress);

e_print ('HOST: ' + remoteHost.AddressList[0]);

And result is

(crxTelemetryLib.Transmitter) e_print: PassedIP: 127.0.0.1

(crxTelemetryLib.Transmitter) e_print: HOST: ::0.0.0.1

(crxTelemetryLib.Transmitter) e_print: RemoteIP: ::0.0.0.1

(crxTelemetryLib.Transmitter) e_print: Add(): ::0.0.0.1

(crxTelemetryLib.Transmitter) e_print: IP: ::0.0.0.1

(crxTelemetryLib.Transmitter) e_print: PORT: 54345

(crxTelemetryLib.Transmitter) e_print: Activate(): Invalid arguments

Seems its trying to treat 127.0.0.1 as a domain name.

Have to go to day job now so will poke about some more when I get back.

I doubt it would be borking because of my three 127.0.0.1 entries in my /etc/hosts tho....

right to work before I\'m late.

Link to comment
Share on other sites

More debug:

(crxTelemetryLib.Transmitter) e_print: HOST: ::0.0.0.1

(crxTelemetryLib.Transmitter) e_print: HOST: 127.0.0.1

(crxTelemetryLib.Transmitter) e_print: HOST: fe80::1

Seems something is awry...

System.Net.IPHostEntry remoteHost = System.Net.Dns.GetHostEntry (_ipAddress);

// e_print ('HOST: ' + remoteHost.AddressList[0]);

foreach (var entry in remoteHost.AddressList) {

e_print ('HOST: ' + entry);

}

I\'ve got this far thru my general programming knowledge but unsure as to a suitable solution...

Link to comment
Share on other sites

OK. I now have a working file/plugin.

I\'ll post my source/dll shortly

Is attached :-D

Taught myself some C now didn\'t I :-D

Essentially threw in a try/catch on the parse to see if ip address is a ip address.

And process as string/domain name otherwise.

Why host lookup an IP Address to convert it to an ip address when it already is one.

I need to test the domain name but most people will likely be using ip addresses anyway

Fails with my localhost string (obviously returning three entries and the first is bad).

But works with my 'computer name'/internal domain name.

Link to comment
Share on other sites

  • 3 weeks later...

Here\'s a map and elevated view of Kerbin from data I\'ve been collecting over the last two weeks or so, while testing the latest version of the plugin (to be released shortly after 0.15 is out and reasonably stable).

6F7KkGwh DrNpHVcX

(click for full-size)

BTW still experimenting with the gnuplot palette mapping, if anybody knows a good mix for topographic maps, I\'m game... ;)

Link to comment
Share on other sites

Why host lookup an IP Address to convert it to an ip address when it already is one.

Because I wanted the way of addressing the receiver as flexible as possible: the string _ipAddress might already contain a valid IP address ('123.45.67.89'), but it could also be a DNS name ('myPC.mydomain.whatever'), or 'localhost', or an invalid address altogether.

Obviously I didn\'t test thoroughly enough... but it should be fixed in the next version ('should' because I don\'t have a Mac for testing).

In the meantime, thanks for the workaround ;)

Link to comment
Share on other sites

No problem.

Will test when the new version out.

I might help further and contribute back some code if I come up with anything clever to add.

I wonder if my issue might also be related to having Parallels (VM) installed, buts it is odd that it returns 0.0.0.0 as one of the reverse DNS lookups.

Link to comment
Share on other sites

No problem.

Will test when the new version out.

I might help further and contribute back some code if I come up with anything clever to add.

I wonder if my issue might also be related to having Parallels (VM) installed, buts it is odd that it returns 0.0.0.0 as one of the reverse DNS lookups.

Thanks again.

I have no idea about how a VM might influence DNS resolution, but the new code will try to connect to the next address in the list until it succeeds or runs out of options.

Link to comment
Share on other sites

Cunning.

VM stuff means I have two additional virtual Network interfaces.

But I don\'t think this should affect DNS resolution.

Might be worth checking that the IP address resolved is not 0.0.0.0

The problem with the previous implementation was that I only tried to connect to the first returned address; if that was invalid, no further attempts were made.

Now as long as the DNS resolver returns at least one usable address, a connection will be established, so I don\'t think there\'s a need to check for specific invalid addresses.

If for some reason the DNS resolver fails to return a valid address, explicitly specifying a known working IP address in the part.cfg should work anyway (dotted quad, i.e. '127.0.0.1' for localhost, or a routable address if you want to connect to another machine), even with the current version of the plugin.

Link to comment
Share on other sites

I\'ll retest with 127.0.0.1 explictly but I\'m sure it wasn\'t working when I tried explicit IP.

Am at work currently so will try when home.

Just a question that comes to mind: did you start the receiver in the same VM instance as KSP was running in? Every virtual machine would have its own 'localhost', so it wouldn\'t work across different VMs or to the host OS.

EDIT:

I don\'t know how Parallels is configured out-of-the-box. You might have to set up routing in your VM to get access to other VMs or the host OS.

Link to comment
Share on other sites

Wasn\'t running it inside the VM.

The VM isn\'t running. It just generates extra Virtual Network Adapters.

I\'m running KSP on OSX (the host machine), I just have VM software installed.

Just mentioned it on a side point. Tho I doubt its the problem. Could even be a bug in Unity\'s host lookup code.

Link to comment
Share on other sites

  • 2 weeks later...

@crxTelemetry:

I\'m trying to run two instances of udpreceiver (don\'t ask why ::) ) but I don\'t know how to set the port to listen on so I\'m getting a conflict.

The first instance I run just idpreceiver and it seems to default to 59848 (despite a different port in the cfg!). Is there a command line option to set the port on the second instance of udpreceiver?

Thx.

Link to comment
Share on other sites

According to the source no.

Its hardcoded to 54345.

Short solution, another machine.

Long solution download MonoDevelop edit and compile your own.

Though without running two KSP\'s you can\'t run two instances of Telemetry on different configs anyway

Link to comment
Share on other sites

@crxTelemetry:

I\'m trying to run two instances of udpreceiver (don\'t ask why ::) ) but I don\'t know how to set the port to listen on so I\'m getting a conflict.

The first instance I run just idpreceiver and it seems to default to 59848 (despite a different port in the cfg!). Is there a command line option to set the port on the second instance of udpreceiver?

Thx.

I suggest you use ncat from nmap.org (click here for Windows download), as I wrote in the original post. It is much more reliable and flexible than the very basic UDPReceiver ;)

Basically, why I included UDPReceiver at all was as an example for others to build upon.

As BarryCarlyon said, the IP port is hardcoded in the UDPReceiver. If there is demand, I may make that configurable.

EDIT:

Depending on your scenario, you can of course capture both (or multiple) transmitters with one instance of the UDPReceiver (all transmitters using the same port and address), and filter the output by the module UUID.

EDIT 2:

Though without running two KSP\'s you can\'t run two instances of Telemetry on different configs anyway

Not out of the box, but as long as all modules are within 'physics' range from each other (on the same vessel, or up to ~2.5km apart), you can always edit the persistent.sfs to your liking.

If you don\'t feel confident about editing the .sfs, you can also launch one vessel, exit KSP and edit the telemetry part.cfg, then launch another vessel; the settings are remembered individually for each ship.

Link to comment
Share on other sites

EDIT:

Depending on your scenario, you can of course capture both (or multiple) transmitters with one instance of the UDPReceiver (all transmitters using the same port and address), and filter the output by the module UUID.

EDIT 2:Not out of the box, but as long as all modules are within 'physics' range from each other (on the same vessel, or up to ~2.5km apart), you can always edit the persistent.sfs to your liking.

If you don\'t feel confident about editing the .sfs, you can also launch one vessel, exit KSP and edit the telemetry part.cfg, then launch another vessel; the settings are remembered individually for each ship.

Good point.

Then you can receive telemetry, for the current ship and the one you are rendezvousing with.

Hadn\'t considered that one *makes note for thing he\'s building*

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...