1. Home
  2. Protocol
  3. The Connection Process

The Connection Process

The StayLinked handshake process is an exchange of four packets. See image. Host Timeout is displayed when one of these packets is dropped or arrives out of sequence. All of the packets in this transaction use the UDP protocol. Additional information about the packets required by a StayLinked connection is detailed in the StayLinked Secure Communication Guide available in this link.

Connection Request: The first packet comes from port 3771 of the client device to the server on port 3006. When the server receives this packet, it will add the connection to the connections list and create the handler log file if logging is set to protocol or higher. The administrator’s connections list is not real-time, so it must be refreshed during the handshake to display connections in process. The StayLinkedHandler.IPAddress.log entry will display:

01/25/2010 08:29:42:549 - StayLinked Handler Starting Session for 10.10.225.150

Connection Accept: The server will send a response from server port 3006 to the client device on port 3771. The StayLinkedHandler.IPAddress.log entry will display:

01/25/2010 08:29:42:597 - StayLinked Handler: Attempting to open a socket on IP 192.168.100.12 on a UDP port between 5000 and 6000
01/25/2010 08:29:42:723 - StayLinked Handler is using socket on IP: 192.168.100.12 Port: 5007
01/25/2010 08:29:42:723 - Sending Connect Accept to: 10.10.225.150:3771

When this packet arrives at the client it will display "Register Port…" on the screen. This packet is used to notify the device of the dedicated server port that has been opened for transactions specific to this session.

Registration Request: The gun sends a response from port 3771 to the server on the new dedicated port. When the packet is received by the server, it will record the transaction in the handler log file. The StayLinkedHandler.IPAddress.log entry will display:

01/25/2010 08:29:43:029 - StayLinked Handler Processing Registration for 10.10.225.150 at 10.10.225.150:3771

This dedicated port range is configurable in the firewall settings in the server settings section of the administrator. More details on this fixed port range at detailed in the troubleshooting section below.

Registration Accept: The server will send the final confirmation from the dedicated server port to the client port 3771. The StayLinkedHandler.IPAddress.log entry will display:

01/25/2010 08:29:43:029 - Sending Registration Accept to: 10.10.225.150:3771

This will appear on the device as a "Client Connected!" message.

Once the handshake is complete, the server will send a ‘Get Device Config’ to the client. The StayLinkedHandler.IPAddress.log entry will display:

01/25/2010 08:29:43:170 - esp_GetDeviceConfig()

The client response will include information about the display area, device type, client version, and other details. This string of information is used by the server to determine the device group, telnet host, and other various connection parameters. The StayLinkedHandler.IPAddress.log entry will display:

01/25/2010 08:29:43:248 - esp_GetDeviceConfig() returns'AB~001~19~000~PDT9090_E5~16~26~09~01~0107~0000~000~0015708E863F
~640~6006~1~20100118100852~S~WindowsCE      ~2~01~0~'

If the server does not get this response within 10 seconds, it will display the error eSP0008 and stat that it could not get the device config.

Updated on January 20, 2021

Related Articles