AirNav Systems Forum

AirNav ShipTrax => AirNav ShipTrax Discussion => Topic started by: tarbat on January 23, 2010, 05:18:45 PM

Title: TCP/IP Server or Client
Post by: tarbat on January 23, 2010, 05:18:45 PM
In ShipTrax, with TCP/IP input selected, is ShipTrax operating as a server or a client?

I ask, because I'm redeveloping sp2trax to output to a tcp port, and can't work out if sp2trax should operate as a client or a server.
Title: Re: TCP/IP Server or Client
Post by: tarbat on January 25, 2010, 03:23:08 PM
Don't worry, I worked it out - ShipTrax operates as a TCP client.

So I've now created a version of sp2trax that operates as a server on port 1515.

(http://farm5.static.flickr.com/4005/4304193600_15b8e19b39_o.jpg)
Title: Re: TCP/IP Server or Client
Post by: Allocator on January 25, 2010, 03:37:09 PM
Tarbat,

I'm still hanging onto your coat-tails here!  OK, I can see the 'Connected on Port 1515' and data flowing in sp2trax and I've got ANSH TCP/IP set to 1515.  Do I need to enter an IP address too, if so, which one?  PC/Router/ANSH?
Title: Re: TCP/IP Server or Client
Post by: tarbat on January 25, 2010, 04:01:20 PM
If sp2trax is running on the same PC as Shiptrax, then use port=1515 and IP=127.0.0.1 in ShipTrax.  You might have to mess around with starting/stopping in ShipTrax to get it to connect - t looks like ShipTrax doesn't release it's connection sometimes.

What I do:
1. Startup ShipPlotter, and get it running.
2. Startup ShipTrax, and make sure its setup to read port 1515 on 127.0.0.1
3. Startup sp2trax, and press the Start Server button.

It's not that friendly, but at least means we can beta test the TCP/IP side of ShipTrax.
Title: Re: TCP/IP Server or Client
Post by: Allocator on January 25, 2010, 04:08:53 PM
OK, hacked it as you were replying.  I've actually put in the IP address of my PC and that works fine.  I was making random changes to the ANSH settings and not restarting sp2trax/ANSH in a logical order.

I'll try 127.0.0.1 too as that was what I was expecting to work.
Title: Re: TCP/IP Server or Client
Post by: Allocator on January 25, 2010, 04:11:23 PM
Yep, 127.0.0.1 works fine.

Well done tarbat, a clever bit of VB.  Watching Ships now :-)
Title: Re: TCP/IP Server or Client
Post by: tarbat on January 25, 2010, 05:08:05 PM
New version attached, which makes the AIS output compliant with other ship-tracking software.  My mistake - I'd left off the CR/LF at the end of each AIS message.

Also, by feeding this into another instance of ShipPlotter running on another PC, I've established that ShipTrax does not process AIS messages from Search & Rescue helicopters, whereas ShipPlotter does.  Something for the beta-team to fix.

(http://farm5.static.flickr.com/4065/4304308884_2cc9b71314_t.jpg) (http://www.flickr.com/photos/tarbat/4304308884/sizes/o/)
Title: Re: TCP/IP Server or Client
Post by: jannuh on January 26, 2010, 09:58:49 AM
Are you the only 2 beta testers of ShipTrax???
Title: Re: TCP/IP Server or Client
Post by: Allocator on January 26, 2010, 10:05:45 AM
Are you the only 2 beta testers of ShipTrax???


No.