Welcome To Our Support Portal

Browse Impinj resources for help with FAQ, downloads, quick links, and more.


Submit a request

Speedway Connect Data Integration

Follow


When you configure and run Speedway Connect, as described in Support Article: Speedway Connect System Configuration, data is outputted as tags are read by the reader or gateway. Here we describe the data format to enable you to develop your application to consume the data stream.  Because of the portable nature of the data format, your code can be rewritten in virtually every modern programming language and development tool.

Speedway Connect outputs RAIN RFID data into two different formats, JSON or Key Value Pair.  As of Speedway Connect release 2.4.0, all three different operating modes are supported, namely inventorylocation, and direction

Depending on the output format and the operating mode, the data created by Speedway Connect will vary.  To illustrate this, sample data was captured reading 3 tags with EPC's 999908290000000000000004, 999908290000000000000003, and 999908290000000000000001 by running an xArray in each of the 3 operating modes.

In Location mode, confidenceData provides a list of key/values. Only the values for key=130 and key= 136 are used by applications.  These applications calculate the location of a tag when read by multiple xArrays.

These data formats are common among all types of Speedway Connect output channels namely: HTTP Post, TCP/IP socket, Serial, keyboard emulation, and USB Flash Drive. 

Operating

Mode

Output Data Format: 

JSON

Output Data Format: 

Key Value Pairs

Inventory (All Models)

 

{"antennaPort":7,"epc":"999908290000000000000004",
"firstSeenTimestamp":"2018-06-14T00:15:54.36879Z",
"peakRssi":-51,"isHeartBeat":false}

{"antennaPort":23,"epc":"999908290000000000000003",
"firstSeenTimestamp":"2018-06-14T00:15:54.373293Z",
"peakRssi":-50,"isHeartBeat":false}

{"antennaPort":25,"epc":"999908290000000000000001",
"firstSeenTimestamp":"2018-06-14T00:15:54.410799Z",
"peakRssi":-62,"isHeartBeat":false}

Format:

<AntennaPort>,<EPC>,<FirstSeenTImestamp>,
<PeakRSSI>

Example:

44,999908290000000000000003,
2018-06-14T00:19:31.289654Z,-5

34,999908290000000000000001,
2018-06-14T00:19:31.523961Z,-58

19,999908290000000000000004,
2018-06-14T00:19:31.845250Z,-52

Location (xArray)

{"epc":"999908290000000000000004","lastSeenTime":
"2018-0614T00:54:18.305623Z","type":"update",
"xCm":23,"yCm":189,"confidenceWeight":9842,
"confidenceData":[130,2519697,131,2519697,132,12,
133,19,134,42565,135,6,136,6]}

{"epc":"999908290000000000000001","lastSeenTime":
"2018-06-14T00:54:23.269842Z","type":"update",
"xCm":-7,"yCm":187,"confidenceWeight":4247,
"confidenceData":[130,1087483,131,1087483,132,12,
133,17,134,76099,135,13,136,13]}

{"epc":"999908290000000000000003","lastSeenTime":
"2018-06-14T00:54:23.272192Z","type":"update",
"xCm":22,"yCm":226,"confidenceWeight":19769,
"confidenceData":[130,5061030,131,5061030,132,12,
133,17,134,74480,135,13,136,13]}

999908290000000000000004,
2018-06-14T00:52:41.483983Z,
update,24,201,23249,130,
5951772,131,5951772,132,12,133,
20,134,53800,135,13,136,13

999908290000000000000001,
2018-06-14T00:52:46.485955Z,
update,-4,185,4535,130,1161084,
131,1161084,132,12,133,17,134,
60387,135,13,136,13

999908290000000000000003,
2018-0614T00:52:46.516607Z,
update,25,233,21337,130,5462377,
131,5462377,132,12,133,17,134,
31382,135,13,136,13

Direction

(xArray)-

the 3 tags transitioned between sectors 4 and 8

{"epc":"999908290000000000000004","type":"exit",
"tagPopulationStatus":"ok","firstSeenTime":
"2018-06-14T21:44:44.541582Z","lastSeenTime":
"2018-06-14T21:44:50.162242Z","firstSeenSector":4,
"lastSeenSector":8}

{"epc":"999908290000000000000003","type":"exit",
"tagPopulationStatus":"ok","firstSeenTime":
"2018-06-14T21:44:44.866000Z","lastSeenTime":
"2018-06-14T21:44:50.276220Z","firstSeenSector":4,
"lastSeenSector":8}

{"epc":"999908290000000000000001","type":"exit",
"tagPopulationStatus":"ok","firstSeenTime":
"2018-06-14T21:45:07.15372Z","lastSeenTime":
"2018-06-14T21:45:11.558981Z","firstSeenSector":8,
"lastSeenSector":4}

999908290000000000000003,
2018-06-14T21:53:03.545328Z,
2018-06-14T21:53:06.860999Z,
exit,4,8,ok

999908290000000000000004,
2018-06-14T21:53:03.97411Z,
2018-06-14T21:53:07.471791Z,
exit,4,8,ok

999908290000000000000001,
2018-06-14T21:53:31.725254Z,
2018-0614T21:53:36.758286Z,
exit,8,4,ok

 

 

When sending data over HTTP additional data is provide for the HTTP server to identify which reader or gateway is communicating with it.

JSON
Key Value Pairs
{ "reader_name": "xarray-xx-xx-xx","mac_address":"XX:XX:XX:XX:XX:XX","tag_reads" :[ <data stream described above> ]}  The POST variables sent by Speedway Connect:
  • reader_name : The name assigned to the reader in Speedway Connect
  • mac_address : The MAC address of the reader
  • line_ending : Line ending character specified in Speedway Connect
  • field_delim : Field delimiter character specified in Speedway Connect
  • field_names : A list of field names, separated by the specified delimiter
  • field_values : <data stream described above>

 

Testing the Output

Once Speedway Connect is configured and before developing your application, you will want to see the data as it is generated.  Here are a few options to try when testing Speedway Connect and developing software to consume data.

1) TCP/Socket Output

The simplest method is the open a TCP/IP connection to the reader using a telnet program. 

First, make sure that in the Speedway Connect Web UI under "Output: Connection" has the following setup. For how to access the Web UI see Support Article: Speedway Connect System Configuration. Also select the data output format: JSON or Key-Value Pairs.

tcp.png

"Output: Connection" in Web UI

 

output.png

 "Output: Data" in Web UI

Second, start Speedway Connect making sure that the status is green after the Apply button is pressed.

titleBar.png

Title bar -  Web UI

 

Third, connect to the Speedway or gateway using a telnet client program.  Here we use putty: 

putty.png

Forth, press the "Open" button to start the telnet session and now you should start to see the live data stream assuming that there are tags in the field of view of the antenna.

cmd.png

 

2) HTTP Post in JSON Output Data Format

To examine the HTTP Post output sent from Speedway Connect, please try the following:

Step 1) Configure the Web UI to output HTTP Post data under "Output Connection" and select the JSON output format. 

post.png

Output Connection in Web UI

 

json.png

 

2) Use the following Python program to display the HTTP post data

You can view HTTP post traffic from Speedway Connect with a short python script.

        1) Install Python 2.7 or greater

        2) install Flask by typing command:    pip install Flask

        3) Save this file shown below as PostServer.py

from flask import Flask, request
app = Flask(__name__)

@app.route('/connect', methods = ['POST', 'GET'])
def message():
if request.method == 'POST':
app.logger.info('Request received.')
app.logger.info('Url: %s', request.url)
app.logger.info('Data: %s', request.data)
app.logger.info('Is JSON: %s', request.is_json)
else:
app.logger.info('GET request received.')
return 'OK\n'

if __name__ == '__main__':
app.run(host='0.0.0.0', port='5000', debug=1)

         PostServer.py

        4) run command:  python  PostServer.py   to see the http post output.

Best Practices

  • Make sure that the port (default 5000) accepts inbound traffic so adjusting the firewall on your computer may be necessary.
  • The HTTP post interval (default 300 seconds) can be lowered to say 10 seconds so you will not have to wait very long for the data to appear.

postcmd.png

3) Parsing Key Value Pair HTTP Post Data

This  server-side php script parses the POST data and insert it into a relational database. 

To output Key-Value Pairs data, remember to set the output format correctly.

dataout.png

Developing an Application

The most popular method today is to develop an application that receives HTTP posts in JSON format.  This method is supported by all major programming langues and a wide variety of programming tools to help. Since HTTP post is a standard approach to sending data over the internet, speedway connect can post data up to a cloud application without the concern of being blocked by a firewall.


Was this article helpful?
0 out of 0 found this helpful

Comments

Impinj (NASDAQ: PI) wirelessly connects billions of everyday items such as apparel, medical supplies, and automobile parts to consumer and business applications such as inventory management, patient safety, and asset tracking. The Impinj platform uses RAIN RFID, delivering information about items to the digital world and enabling the Internet of Things.