Introduction

This document outlines the communications protocol that the YardsTech® Stick Reader uses to communicate with other third party software via WiFi.


Broadcasting device presence

The YardsTech® Stick Reader will periodically (approx. every 5 seconds) send a UDP broadcast packet onto the WiFi network. The broadcast will contain the unit's unique identifier (eg. "FXL-YTR001-12:34:56:78:90:AB") and will be to IP address 255.255.255.255 on port 15000.

Any device listening for broadcast packets on this port can use the source address of the UDP packet to determine the IP address of the YardsTech® Stick Reader.


Establishing a connection to the device

To communicate with the YardsTech® Stick Reader a TCP connection must be created on port 20000. All commands are sent to and received from the YardsTech® Stick Reader must be on that port. The YardsTech® Stick Reader can support up to 10 simultaneous client connections.


Maintaining a connection to the device

The YardsTech® Stick Reader monitor client connections and will automatically close/disconnect client connections that have fallen silent. If a connection has not been used (ie no commands have been received) within the last approx. 5 seconds the YardsTech® Stick Reader will send a ping to the client. The format of the ping is as follows:

[!]<crlf>

The client must respond to the ping with the same response i.e.

[!]<crlf>

If the client has not responded within approx. 25 seconds, then connection will be closed and discarded.


Commands issued by the device

The following commands can be issued by the YardsTech® Stick Reader at any point in time. They are sent to all currently connected clients, but do not require a response from the client.

EID/RFID received

Command : [Rxxxxx]<crlf>

Function : The YardsTech® Stick Reader scanned an EID. "xxxxx" will be the EID number scanned by the reader, normally in the format similar to this example "982 123456789012".