User Guide

Ethernet Communication between HOST and THINKIFY HSP3.0
The communication between a HOST system and the Thinkify HSP3.0 system is
performed over 3 Ethernet PORT connections. These port connections are simple ASCII
protocol Telnet type connections.
The three ports are used for command and control (called the CMD port), status of the
operations inside the triggered programming loops (called the DATA port) and a
diagnostic stream indicating timing and occurrence of various events in the HSP
operation (called the DIAG port).
It is very useful for the HOST to log all messages on the DIAG port - especially in cases
of system setup and in the troubleshooting of problems. If the system is functioning
properly there is no need to have the DIAG port open, but it is generally advised to do so.
The ports are configured as SERVERS and expect the host to establish a CLIENT
connection to initiate communication. The CMD port is full duplex - commands can be
sent from the host and responses to commands received. The DATA and DIAG port are
simplex - data is only sent from the system to the host - the only system reception on
these ports is to perform the necessary TCP protocol handshaking and port termination.
The server configuration will allow up to 5 simultaneous client connections on each port -
however - it is NEVER necessary to have more than one client connection to each. Code
execution overhead is increased with each client connection so it is advised to only have
one connection open during operation. There is NEVER any need during the program
flow to disconnect and reconnect port. Connections should be done ONCE at the
beginning of the operation and left connected until it is desired to completely exit the
system.
However if more than one client connection is opened for some reason - the CMD port
will only send responses to the CMD port which sent the command being responded to,
the DATA and DIAG ports will send identical data to all open ports.
There are also some diagnostic messaging on the Linux console port - mainly concerning
initialization operations before the ports are connected and status of the port connections.
It can be useful to have access to this console port either through the HDMI port of the PI
or through a SSH connection into the Linux system.
Copyright 2014 Thinkify LLC. All Rights Reserved.
Thinkify, LLC, 18450 Technology Drive, Suite E1, Morgan Hill, Ca. 95037, www.thinkifyit.com 408-782-7111