anything
AirNav RadarBox
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 


Author Topic: TCP/IP Server or Client  (Read 22819 times)

0 Members and 2 Guests are viewing this topic.

tarbat

  • ShipTrax Beta Testers
  • Hero Member
  • *
  • Posts: 4219
    • Radarbox at Easter Ross
TCP/IP Server or Client
« 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.
« Last Edit: January 23, 2010, 05:23:12 PM by tarbat »

tarbat

  • ShipTrax Beta Testers
  • Hero Member
  • *
  • Posts: 4219
    • Radarbox at Easter Ross
Re: TCP/IP Server or Client
« Reply #1 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.

« Last Edit: January 25, 2010, 04:30:59 PM by tarbat »

Allocator

  • RadarBox24.com Beta Testers
  • Hero Member
  • *
  • Posts: 3568
Re: TCP/IP Server or Client
« Reply #2 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?

tarbat

  • ShipTrax Beta Testers
  • Hero Member
  • *
  • Posts: 4219
    • Radarbox at Easter Ross
Re: TCP/IP Server or Client
« Reply #3 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.

Allocator

  • RadarBox24.com Beta Testers
  • Hero Member
  • *
  • Posts: 3568
Re: TCP/IP Server or Client
« Reply #4 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.

Allocator

  • RadarBox24.com Beta Testers
  • Hero Member
  • *
  • Posts: 3568
Re: TCP/IP Server or Client
« Reply #5 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 :-)

tarbat

  • ShipTrax Beta Testers
  • Hero Member
  • *
  • Posts: 4219
    • Radarbox at Easter Ross
Re: TCP/IP Server or Client
« Reply #6 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.

« Last Edit: January 25, 2010, 05:24:24 PM by tarbat »

jannuh

  • Guest
Re: TCP/IP Server or Client
« Reply #7 on: January 26, 2010, 09:58:49 AM »
Are you the only 2 beta testers of ShipTrax???

Allocator

  • RadarBox24.com Beta Testers
  • Hero Member
  • *
  • Posts: 3568
Re: TCP/IP Server or Client
« Reply #8 on: January 26, 2010, 10:05:45 AM »
Are you the only 2 beta testers of ShipTrax???


No.