Contents · Contents Basics ..... 3 Quick start/brief example ...

28
race|result Decoder Communication Protocol Version 2.0 race result AG | Joseph-von-Fraunhofer-Str. 11 | 76327 Pfinztal | Germany | www.raceresult.com page 1 of 28 Contents Basics ........................................................................................................................................ 3 Quick start/brief example ............................................................................................................ 3 Basic commands ........................................................................................................................ 5 Get Protocol Version 1 ............................................................................................................. 5 Set Protocol Version 1 .............................................................................................................. 5 Passing Record ...................................................................................................................... 6 Get Single Passing ................................................................................................................. 7 Get Multi Passing.................................................................................................................... 8 Number of Passings................................................................................................................ 8 Get Time ............................................................................................................................... 10 Set Time ............................................................................................................................... 10 Set Start Time ....................................................................................................................... 10 Set GPS Time ....................................................................................................................... 11 Get Status............................................................................................................................. 11 Get Mode .............................................................................................................................. 13 Set Operation Mode .............................................................................................................. 13 Stop Operation Mode ............................................................................................................ 14 Advanced commands ............................................................................................................... 15 Ping 5 ..................................................................................................................................... 15 Start Upload 9 ........................................................................................................................ 15 Stop Upload 9 ......................................................................................................................... 15 Push Mode 5 .......................................................................................................................... 16 Push Prewarns 5 .................................................................................................................... 17 Enable/Disable host if the race|result Decoder acts as client 5 ............................................... 18 Getting the status of accessible active boxes 7 ...................................................................... 19 New File 20 ............................................................................................................................. 20 List Files 20 ............................................................................................................................. 20 Clear Files 20 .......................................................................................................................... 20 Get File 20 .............................................................................................................................. 21 Get Firmware Version 9 .......................................................................................................... 22 Setting and getting config parameters 5 ..................................................................................... 23 General ................................................................................................................................. 23 Network ................................................................................................................................ 24 Detection 9 ............................................................................................................................. 25 Active .................................................................................................................................... 26

Transcript of Contents · Contents Basics ..... 3 Quick start/brief example ...

race|result Decoder Communication Protocol Version 2.0

race result AG | Joseph-von-Fraunhofer-Str. 11 | 76327 Pfinztal | Germany | www.raceresult.com page 1 of 28

Contents Basics ........................................................................................................................................ 3

Quick start/brief example ............................................................................................................ 3

Basic commands ........................................................................................................................ 5

Get Protocol Version1 ............................................................................................................. 5

Set Protocol Version1 .............................................................................................................. 5

Passing Record ...................................................................................................................... 6

Get Single Passing ................................................................................................................. 7

Get Multi Passing .................................................................................................................... 8

Number of Passings................................................................................................................ 8

Get Time ............................................................................................................................... 10

Set Time ............................................................................................................................... 10

Set Start Time ....................................................................................................................... 10

Set GPS Time ....................................................................................................................... 11

Get Status ............................................................................................................................. 11

Get Mode .............................................................................................................................. 13

Set Operation Mode .............................................................................................................. 13

Stop Operation Mode ............................................................................................................ 14

Advanced commands ............................................................................................................... 15

Ping5 ..................................................................................................................................... 15

Start Upload9 ........................................................................................................................ 15

Stop Upload9 ......................................................................................................................... 15

Push Mode5 .......................................................................................................................... 16

Push Prewarns5 .................................................................................................................... 17

Enable/Disable host if the race|result Decoder acts as client5 ............................................... 18

Getting the status of accessible active boxes7 ...................................................................... 19

New File20 ............................................................................................................................. 20

List Files20 ............................................................................................................................. 20

Clear Files20 .......................................................................................................................... 20

Get File20 .............................................................................................................................. 21

Get Firmware Version9 .......................................................................................................... 22

Setting and getting config parameters5 ..................................................................................... 23

General ................................................................................................................................. 23

Network ................................................................................................................................ 24

Detection9 ............................................................................................................................. 25

Active .................................................................................................................................... 26

race|result Decoder Communication Protocol Version 2.0

race result AG | Joseph-von-Fraunhofer-Str. 11 | 76327 Pfinztal | Germany | www.raceresult.com page 2 of 28

Client Mode .......................................................................................................................... 27

Upload .................................................................................................................................. 27

Attachments ............................................................................................................................. 28

Valid time zones (Version 1.9) .............................................................................................. 28

Rev Date Notes Author

0 29.10.2014 Initial Publication TV

8 22.04.2016 Minor reformatting JL

9 25.07.2016 Updated to protocol version 1.9 TV

10 02.12.2016 Updated to protocol version 2.0 TV

11 11.01.2017 Restructured, added up-to-date example TV

race|result Decoder Communication Protocol Version 2.0

race result AG | Joseph-von-Fraunhofer-Str. 11 | 76327 Pfinztal | Germany | www.raceresult.com page 3 of 28

Basics

Hosts use a text-based protocol to communicate with race|result 4000/5000 Series System’s

decoder via TCP/IP on port 3601 or via RS232 using a USB-COM-port adapter. By default the

race|result Decoder acts as server, but since protocol version 1.5 a client mode is also

available. The default approach for getting passings is pull-based. Since version 1.5 the

decoder can automatically push passings to the host as they appear, too.

Quick start/brief example

The following example assumes that you’ve successfully established a connection to the

race|result Decoder. You can establish a connection either with your own software or, for testing

purposes, using a Telnet client like the one that Windows offers or PuTTY. For the remainder of

the document, the following symbols are used:

← denotes commands that you send

→ responses from the race|result decoder.

<CrLf> are the carriage return and line feed characters which needs to be added after

every command. (Note: A telnet client will do this automatically when you press the enter

key.)

For a complete description of a specific command refer to its individual section.

First set the protocol version to the latest version available at the time you are doing your

implementation. That way you can use all available features. The newest protocol version might

not be available if the decoder’s firmware is not up to date. Note: Newer (upcoming) firmware

versions will always support older protocol versions.

← SETPROTOCOL;2.0<CrLf>

→ SETPROTOCOL;2.0<CrLf>

After start up, the decoder is in Test Mode and will not sotre passings. To switch to operation mode:

← STARTOPERATION<CrLf>

→ STARTOPERATION;OK;0000-00-00;00:00:00.000<CrLf>

Now passings are saved and the time is running on the decoder. You can query the current time

using:

← GETTIME<CrLf>

→ GETTIME;0000-00-00;00:02:12.942<CrLf>

race|result Decoder Communication Protocol Version 2.0

race result AG | Joseph-von-Fraunhofer-Str. 11 | 76327 Pfinztal | Germany | www.raceresult.com page 4 of 28

To check the current number of passings:

← PASSINGS<CrLf>

→ PASSINGS;1<CrLf>

This assumes that you have generated a passing on the decoder using a transponder or a

marker detection.

To fetch that passing, simply send the number 1:

← 1<CrLf>

→ 1;592;0000-00-00;12:30:12.322;888;4;-52.778000;38cd1c;0;;;;;;;;D-4476<CrLf>

<CrLf>

Note: You can query multiple passings by calling X:C where X is the first passing that should be

returned and C is the max. number of passings that the call will return.

Instead of only querying the current time, you can request extended status information:

← GETSTATUS<CrLf>

→ GETSTATUS;0000-00-00;00:02:39.942;1;11111111;1;50;1;49.721,8.254939;1;0;

;;;;;;1;0<CrLf>

You will most probably call the PASSINGS, GETTIME and GETSTATUS periodically and fetch new

passings as soon as PASSINGS reports them. After your event has finished you can stop the

operation mode so no new passings will be saved when the decoder detects transponders:

← STOPTOPERATION<CrLf>

→ STOPTOPERATION;OK<CrLf>

race|result Decoder Communication Protocol Version 2.0

race result AG | Joseph-von-Fraunhofer-Str. 11 | 76327 Pfinztal | Germany | www.raceresult.com page 5 of 28

Basic commands

Get Protocol Version1

In order to get protocol version information, the host sends GETPROTOCOL<CrLf>

The decoder responds with:

GETPROTOCOL;<CurrentVersion>;<MinSupportedVersion>;<MaxSupportedVersion>

Where:

<CurrentVersion> is the current protocol version this connection uses for its

communication,

<MinSupportedVersion> is the minimal protocol version supported by this device; and,

<MaxSupportedVersion> is the maximal protocol version supported by this device.

Example:

← GETPROTOCOL<CrLf> → GETPROTOCOL;1.1;1.0;1.1<CrLf>

Set Protocol Version1

To set protocol version used for this connection, the host sends SETPROTOCOL;<Version><CrLf>,

where <Version> is the protocol version number. The version described in this document is 2.0.

The decoder responds with:

SETPROTOCOL;<VersionOrStatus>

Where: <VersionOrStatus> is

ERROR if the request could not be parsed,

UNKNOWN_VERSION if the requested version is unknown/not available,

<Version> otherwise.

Example:

← SETPROTOCOL;1.4<CrLf>

→ SETPROTOCOL;1.4<CrLf>

race|result Decoder Communication Protocol Version 2.0

race result AG | Joseph-von-Fraunhofer-Str. 11 | 76327 Pfinztal | Germany | www.raceresult.com page 6 of 28

Passing Record

Since protocol version 1.6:

<PassingNo>;<Bib/TranspCode>;<Date>;<Time>;[<EventID>];<Hits>;<MaxRSSI>;

<InternalData>;<IsActive>;[<Channel>];[<LoopID>];[<LoopOnly>];[<WakeupCounter>];

[<Battery>];[<Temperature>];[<InternalActiveData>];BoxName<CrLf>

Older versions:

<PassingNo>;<Bib/TranspCode2>;<Date>;<Time>;<EventID>;<Hits>;<MaxRSSI>1

[;<InternalData>1];<IsActive>4[;<Channel>;<LoopID>;<LoopOnly>;<WakeupCounter>;<Battery>

;<Temperature>;<InternalActiveData>]4a<CrLf>

<PassingNo> Passings record number, starting at 1 for the first passing.

<Bib/TranspCode2> Bib number of the transponder (or transponder code in case of multi

use tags2 or Active transponders4a)

<Date> Format: yyyy-MM-dd

If GPS is used, date of the detection, otherwise 0000-00-00 or 0000-

00-01 after 24 hours and so on.

<Time> Time of the detection, format: hh:mm:ss.kkk

<EventID> ID of the bib set. The combination of <Bib> and <EventID> is unique for

all race|result Bib Transponders ever produced.

In case of multi use tags <EventID> is 0 or empty.2

<Hits> Number of times the tag was detected.

<MaxRSSI>1 Maximum RSSI value found while determining <Time>.

(Maximum value is 25-1 = 31)

[<InternalData>]2 This field is only used for internal purposes and is optional.

<IsActive>4 1 if this passing is from an active transponder

[<Channel>]4a Channel ID (1 -> 8)

[<LoopID>]4a Loop ID (1 -> 8)

[<LoopOnly>]4a 1, if this detection was generated in Store Mode.

[<WakeupCounter>]4a Overall wakeup counter of the transponder (new transponders start at

10000).

[<Battery>]4a Battery level in Volts.

[<Temperature>]4a Temperature in degrees Celsius.

1 since protocol version 1.1, 2 since protocol version 1.2, 3 since protocol version 1.3, 4 since protocol version 1.4, 4a since protocol version 1.4 (if IsActive == 1), 5 since protocol version 1.5, 6 since protocol version 1.6, 7 since protocol version 1.7, 8 since protocol version 1.8, 9 since protocol version 1.9, 20 since protocol version 2.0

race|result Decoder Communication Protocol Version 2.0

race result AG | Joseph-von-Fraunhofer-Str. 11 | 76327 Pfinztal | Germany | www.raceresult.com page 7 of 28

[<InternalActiveData>]4a Data transmission details. One byte. Lowest three bits: channel busy

counter (number of times, the passing could not be transmitted

because the transponder could not access the channel). Next three

bits: no ACK counter (number of times the passing was transmitted,

but no acknowledgement was received.) Seventh bit: 1, if this passing

could not be transmitted at all in a previous attempt (=“stored passing”,

old passing), 0 otherwise. Highest bit: 1, if the transponder woke up

from deep sleep because of the passing, 0 otherwise.

8 7 6 5 4 3 2 1

DS ST No ACK Channel busy

Hint: You can check if a passing is a stored passing using

<InternalData> & 0x40 == 0x40 (the seventh bit is set).

[<BoxName>]6 Name of the decoder. Defaults to the Device ID.

Note: Each individual passing record ends with <CrLf>.

Get Single Passing

In order to receive a certain passing, the host sends the passing number followed by <CrLf>,

e.g.

1423<CrLf>

The decoder responds with the passing record followed by <CrLf>. Therefore, the answer will

end with <CrLf><CrLf>.

Example:

• Single Use Tag:

1423;999;0000-00-00;12:30:45.492;888;4;-65.430000;c23fef;0;;;;;;;;D-4476<CrLf><CrLf>

• Multi Use Tag2: 1424;AAAA-0001;0000-00-00;12:30:45.492;0;4;-65.430000;160ca2;0;;;;;;;;D-4476<CrLf><CrLf>

• Active [Pro]4a: 1;ZZZZZ52;0000-00-00;00:00:01.434;0;19;9;f2d3ef;1;0;0;10240;2.97;26.60;0;D-4476<CrLf><CrLf>

In case the requested passing number does not exist, the decoder responds with:

→ ONLY <N><CrLf>

where <N> is the number of passings available.

race|result Decoder Communication Protocol Version 2.0

race result AG | Joseph-von-Fraunhofer-Str. 11 | 76327 Pfinztal | Germany | www.raceresult.com page 8 of 28

Get Multi Passing

In order to receive several passings, the host sends

<S>:<C>

where <S> is the passing number of the first passing to be sent and <C> is the number of

passings to be sent.

Example (to request passings 1 through to 3):

← 1:3<CrLf>

→ 1;592;0000-00-00;12:30:12.322;888;4;-52.778000;38cd1c;0;;;;;;;;D-4476<CrLf>

2;294;0000-00-00;12:30:14.991;888;3;-50.451000;a2233f;0;;;;;;;;D-4476<CrLf>

3;823;0000-00-00;12:30:18.322;312;12;-45.321000;5aabc8;0;;;;;;;;D-4476<CrLf>

<CrLf>

In case that <S> is greater than the total number of passings available, the decoder responds

with:

→ ONLY <N><CrLf>

where <N> is the number of passings available.

In case that <S> is less than the total number of passings available, but <S>+<C>-1 is greater

than or equal to the total number of passings, the decoder sends only <N>-<S>+1 passings.

Example (for requesting passings

1 to 3, but only 2 passings are available on the device):

← 1:3<CrLf>

→ 1;592;0000-00-00;12:30:12.322;888;4;-52.778000;38cd1c;0;;;;;;;;D-4476<CrLf>

2;294;0000-00-00;12:30:14.991;888;3;-50.451000;a2233f;0;;;;;;;;D-4476<CrLf>

<CrLf>

Number of Passings

In order to receive the number of passings, the host sends PASSINGS<CrLf>

The decoder responds with the following format: PASSINGS;<N><CrLf>

Where <N> is the current number of passings.

Example:

← PASSINGS<CrLf>

→ PASSINGS;159<CrLf>

race|result Decoder Communication Protocol Version 2.0

race result AG | Joseph-von-Fraunhofer-Str. 11 | 76327 Pfinztal | Germany | www.raceresult.com page 9 of 28

race|result Decoder Communication Protocol Version 2.0

race result AG | Joseph-von-Fraunhofer-Str. 11 | 76327 Pfinztal | Germany | www.raceresult.com page 10 of 28

Get Time

To receive the current date and time of the decoder, the host sends GETTIME<CrLf>

The decoder responds with GETTIME;yyyy-MM-dd;hh:mm:ss.kkk<CrLf>

Example:

← GETTIME<CrLf>

→ GETTIME;0000-00-00;12:43:29.942<CrLf>

Set Time

To set the current date and time of the decoder the host sends

SETTIME;yyyy-MM-dd;hh:mm:ss.kkk<CrLf>. This operation can only be done in Test Mode.

The decoder responds with SETTIME;<Result><CrLf>

Where <Result> is either

• date and time with the format yyyy-MM-dd;hh:mm:ss.kkk, if the time was set successfully,

• ERROR, if an error occurred while parsing the request,

• OPERATIONMODE, if the race|result Decoder is in Operation Mode.

Example:

← SETTIME;0000-00-00;12:43:29.942<CrLf>

→ SETTIME;0000-00-00;12:43:29.942<CrLf>

Set Start Time

To set the start date and time of the decoder the host sends

SETSTARTTIME;yyyy-MM-dd;hh:mm:ss.kkk<CrLf>. This operation can only be done in Test Mode.

The decoder responds with SETSTARTTIME;<Result><CrLf>

Where <Result> is either

• date and time with the format yyyy-MM-dd;hh:mm:ss.kkk, if the time was set successfully,

• ERROR, if an error occurred while parsing the request,

• OPERATIONMODE, if the decoder is in Operation Mode.

Example:

← SETSTARTTIME;0000-00-00;12:43:29.942<CrLf>

→ SETSTARTTIME;0000-00-00;12:43:29.942<CrLf>

race|result Decoder Communication Protocol Version 2.0

race result AG | Joseph-von-Fraunhofer-Str. 11 | 76327 Pfinztal | Germany | www.raceresult.com page 11 of 28

Set GPS Time

To set the current date and time of the race|result Decoder, the host sends SETGPSTIME<CrLf>.

This operation can only be done in Test Mode.

The decoder responds with SETGPSTIME;<Result><CrLf>

Where <Result> is either

• date and time with the format yyyy-MM-dd;hh:mm:ss.kkk, if the time was set successfully,

• ERROR, if an error occurred while parsing the request,

• OPERATIONMODE, if the decoder is in operation mode.

Example:

← SETGPSTIME<CrLf>

→ SETGPSTIME;2012-02-27;12:43:29.942<CrLf>

Get Status

In order to receive some general status information of the decoder, the host sends GETSTATUS<CrLf>

The race|result Decoder responds in the following format:

GETSTATUS;<Date>;<Time>;<HasPower>;<Antennas>;

<IsInOperationMode>;<FileNumber>;<GPSHasFix>;<Latitude>,<Longitude>;

<ReaderIsHealthy>;<BatteryCharge>;<BoardTemperature>;<ReaderTemperature>;

<UHFFrequency>;<ActiveExtConnected>4[;<Channel>;<LoopID>;<LoopPower>;<LoopConnected>;

<LoopUnderPower>;<Temperature>]4a[;<TimeIsRunning>;<TimeSource>]20<CrLf>

Where:

<Date> Current date of the decoder, format: yyyy-MM-dd

<Time> Current time of the decoder, format: hh:mm:ss.kkk

<HasPower> 1 if the decoder has power via it's Schuko AC power socket, 0 otherwise

<Antennas> A sequence of 8 antenna status indicators of the UHF unit. Each one is

1 if an antenna is connected, 0 otherwise. Eg. 00011001

<IsInTimingMode> 1 if the decoder is in Operation Mode, 0 otherwise

<FileNumber> Current file number that is used to save the passings

<GPSHasFix> 1 if device has a GPS satellite fix, 0 otherwise

<Latitude> If the device has a GPS fix, the latitude of the device. Hemispheres

indicated by +/- (prior 1.7 by N/S). Prior 1.7: Divide by 100 to get the real

coordinate.

race|result Decoder Communication Protocol Version 2.0

race result AG | Joseph-von-Fraunhofer-Str. 11 | 76327 Pfinztal | Germany | www.raceresult.com page 12 of 28

<Longitude> If the device has a GPS fix, the longitude of the device. Hemispheres

indicated by +/- (prior 1.7 by E/W). Prior 1.7: Divide by 100 to get the

real coordinate.

<ReaderIsHealthy> 1, if the internal UHF module is in normal condition, 0 otherwise

<BatteryCharge> Battery charge in percent

<BoardTemperature> Main board temperature in degrees Celsius. Only valid when there is not

an Active Extension connected to the Feature Port.

<ReaderTemperature> Temperature of the UHF module in degrees Celsius. Only valid when

there is not an Active Extension connected to the Feature Port.

<UHFFrequency> Currently selected frequency number. EU: 0 if frequency is set to Auto,

1=A, 2=B; JP: 0-3; All other regions: 0

<ActiveExtConnected>4 1, if an Active Extension is connected

[<Channel>]4a Selected channel (1 -> 8)

[<LoopID>]4a Selected loop ID (1. -> 8)

[<LoopPower>]4a Selected loop power (0% -> 100%)

[<LoopConnected>]4a 1, if a loop is connected

[<LoopUnderPower>]4a 1, if the loop has reached it's "Loop Limit"

[<TimeIsRunning>]20 0 if there is a static time and the decoder is not in timing mode. 1

otherwise.

[<TimeSource>]20 One of:

0: Time was set manually

1: Time was set by GPS

2: Time was set “by GPS”, but time was only estimated due to bad

reception.

Example without Active Extension:

← GETSTATUS<CrLf>

→ GETSTATUS;0000-00-00;12:43:29.942;1;11111111;1;50;1;49.721,8.254939;1;0;

;;;;;;1;0<CrLf>

With an Active extension connected:

← GETSTATUS<CrLf>

→ GETSTATUS;0000-00-00;12:43:29.942;1;11111111;1;50;1;49.721,8.254939;1;1;

2;3;20%;1;0;1;0<CrLf>

race|result Decoder Communication Protocol Version 2.0

race result AG | Joseph-von-Fraunhofer-Str. 11 | 76327 Pfinztal | Germany | www.raceresult.com page 13 of 28

Get Mode

To check if the race|result Decoder is in Operation Mode, the host sends GETMODE<CrLf>

The decoder responds with:

GETMODE;OPERATION<CrLf> if it is in Operation Mode,

GETMODE;TEST<CrLf> otherwise.

Example:

← GETMODE<CrLf>

→ GETMODE;OPERATION<CrLf>

Set Operation Mode

To switch the race|result Decoder into Operation Mode, the host sends STARTOPERATION<CrLf>

The decoder responds with:

STARTOPERATION;OK;<Date>3;<Time>

3<CrLf>

if the race|result Decoder was switched into Operation Mode, with

STARTOPERATION;OPERATIONMODE;<Date>3;<Time>

3<CrLf>

if the race|result Decoder already was in Operation Mode.

Where:

<Date> Date at which the decoder was successfully put into operation mode,

format: yyyy-MM-dd.

<Time> Time at which the decoder was successfully put into operation mode,

format: hh:mm:ss.kkk.

Example:

← STARTOPERATION<CrLf>

→ STARTOPERATION;OK;0000-00-00;00:10:00.000<CrLf>

race|result Decoder Communication Protocol Version 2.0

race result AG | Joseph-von-Fraunhofer-Str. 11 | 76327 Pfinztal | Germany | www.raceresult.com page 14 of 28

Stop Operation Mode

To switch the decoder into Test Mode, the host sends STOPOPERATION<CrLf>

The decoder responds with:

STOPOPERATION;OK<CrLf> if the operation mode was stopped,

STOPOPERATION;TESTMODE<CrLf> if the decoder already was in Test Mode.

Example:

← STOPOPERATION<CrLf>

→ STOPOPERATION;OK<CrLf>

race|result Decoder Communication Protocol Version 2.0

race result AG | Joseph-von-Fraunhofer-Str. 11 | 76327 Pfinztal | Germany | www.raceresult.com page 15 of 28

Advanced commands

Ping5

If the hosts sends a PING<CrLf> operation, the decoder responds with PING;PONG<CrLf>. You

can use this to keep a connection alive.

Example:

← PING<CrLf>

→ PING;PONG<CrLf>

Start Upload9

To enable passings and status upload of the decoder, the host sends STARTUPLOAD<CrLf>.

The decoder responds with STARTUPLOAD;<Result>[;<Error>]<CrLf>.

Where:

<Result> OK, if upload was enabled successfully, ERROR otherwise.

[<Error>] NOSIM Connection type 2G/3G is selected but no SIM card is found.

CANCELLED User cancelled the connection attempt.

OTHER Unspecified error occurred.

Example:

← STARTUPLOAD<CrLf>

→ STARTUPLOAD;OK<CrLf>

Stop Upload9

To stop upload, the host sends STOPUPLOAD<CrLf>

The decoder responds with STOPUPLOAD;OK<CrLf>.

Example:

← STOPUPLOAD<CrLf>

→ STOPUPLOAD;OK<CrLf>

race|result Decoder Communication Protocol Version 2.0

race result AG | Joseph-von-Fraunhofer-Str. 11 | 76327 Pfinztal | Germany | www.raceresult.com page 16 of 28

Push Mode5

To enable "Push Mode", the host sends SETPUSHPASSINGS;<Enable>;<PushExistingFrom><CrLf>.

Push mode is disabled per default. Passings will be pushed in the current connection only.

Where:

<Enable> 1 if the decoder should push passings. 0 to disable the feature.

<PushExistingFrom> 1 if the decoder should push all existing passings of the current file, 0

otherwise.

Since protocol version 1.9, you can also specify an arbitrary index from

which the race|result Decoder should start pushing passings.

The decoder responds with:

SETPUSHPASSINGS;<Enable>;<PushExisting><CrLf> if the operation was successful,

SETPUSHPASSINGS;ERROR<CrLf> if the parameters are incorrect.

All data that is pushed from the decoder starts with a #. Pushed passings are indicated by a #P;

prefix, the known passings format follows. Example:

#P;1;592;0000-00-00;12:30:12.322;888;4;-52.778000;38cd1c;0<CrLf>

Example:

← SETPUSHPASSINGS;1;0<CrLf>

→ SETPUSHPASSINGS;1;0<CrLf>

[... some time later, a passing occurs]

→ #P;1;592;0000-00-00;12:30:12.322;888;4;-52.778000;38cd1c;0;;;;;;;;D-4476<CrLf>

[... some time later, another passing occurs]

→ #P;2;294;0000-00-00;12:30:14.991;888;3;-50.451000;a2233f;0;;;;;;;;D-4476<CrLf>

race|result Decoder Communication Protocol Version 2.0

race result AG | Joseph-von-Fraunhofer-Str. 11 | 76327 Pfinztal | Germany | www.raceresult.com page 17 of 28

Push Prewarns5

When using the Active Extension, the decoder can push a prewarning string, to indicate that a

passing is about to be received. To enable these prewarns, the host sends

SETPUSHPREWARNS;1<CrLf>, to disable them SETPUSHPREWARNS;0<CrLf>. Prewarns will be pushed

in the current connection only.

The decoder responds with:

SETPUSHPREWARNS;<Enable><CrLf> if the operation was successful,

SETPUSHPREWARNS;ERROR<CrLf> if the parameters are incorrect.

Pushed prewarns are indicated by a #W; prefix. Example:

#W;KCBKM93<CrLf>

Example:

← SETPUSHPREWARNS;1<CrLf>

→ SETPUSHPREWARNS;1<CrLf>

[... some time later, an Active Transponder is passing over the Active Loop]

→ #W;KCBKM93<CrLf>

race|result Decoder Communication Protocol Version 2.0

race result AG | Joseph-von-Fraunhofer-Str. 11 | 76327 Pfinztal | Germany | www.raceresult.com page 18 of 28

Enable/Disable host if the race|result Decoder acts as client5

Instead of a host connecting to the race|result Decoder, the decoder can initiate a connection to

a host, too. To enable a connection to a previously configured host (compare Settings -> Client

Mode), the host sends ENABLEHOST;<HostNum><CrLf>. To disable a previously configured host,

the host sends DISABLEHOST;<HostNum><CrLf>. Where <HostNum> is the index of the host to

enable (1 ->10).

The decoder responds with:

ENABLEHOST;<HostNum><CrLf> if the host connection could be enabled,

ENABLEHOST;ERROR<CrLf> if the selected host is not configured or the index is

out of range

Note that after a successful call returns, it does not mean that the connection is already

established. It just means that the configuration seems to be valid and the race|result Decoder

will try to connect to the host.

The decoder responds accordingly to a DISABLEHOST call, too.

Example:

← ENABLEHOST;1<CrLf>

→ ENABLEHOST;1<CrLf>

race|result Decoder Communication Protocol Version 2.0

race result AG | Joseph-von-Fraunhofer-Str. 11 | 76327 Pfinztal | Germany | www.raceresult.com page 19 of 28

Getting the status of accessible active boxes7

To query the status of the connected Active Extension and the LoopBoxes that are using the

same channel, GETACTIVESTATUS<CrLf> can be sent to the decoder. The decoder responds with

GETACTIVESTATUS;[<DecoderId>,<IsActiveExtension>,<Channel>,<LoopID>,<LoopPower>,

<LoopConnected>,<LoopUnderPower>,<OnBattery>,[<RemainingHours>],

[<SupplyVoltage>],<NoiseAvg>8,<NoisePeak>8;]1..<Count><CrLf>.

Where:

<DecoderId> ID of the Active Extension, or LoopBox.

<IsActiveExtension> 1, if this box is the connected Active Extension, 0 if it is a Loop Box

<Channel> Selected channel (1 -> 8)

<LoopID> Selected loop ID (1 -> 8)

<LoopPower> Selected loop power (0% -> 100%)

<LoopConnected> 1, if a loop is connected

<LoopUnderPower> 1, if the loop limit has been reached

<OnBattery> 1, if the loop box runs on battery

<RemainingHours> Remaining run time in hours, if running on battery

<SupplyVoltage> Supplied Voltage to the decoder, if not running on battery

<NoiseAvg> Average noise on current 2.4 GHz channel

<NoisePeak> Peak noise on current 2.4 GHz channel

It will respond with

GETACTIVESTATUS;ERROR<CrLf>

if no active extension is found.

race|result Decoder Communication Protocol Version 2.0

race result AG | Joseph-von-Fraunhofer-Str. 11 | 76327 Pfinztal | Germany | www.raceresult.com page 20 of 28

New File20

To create a new file without stopping and restarting operation mode, the host sends NEWFILE<CrLf>. The decoder responds with

NEWFILE;OK;<FileNo><CrLf>

if the decoder runs in operation mode and a new file was created. <FileNo> then represents the

file number of the newly created file.

The decoder responds with

NEWFILE;TESTMODE<CrLf>

if it is in test mode and no new file was created.

List Files20

To list all current passing files, the host sends LISTFILES<CrLf>. The decoder responds with

LISTFILES;<FileCount>[;<FileNo>,<PassingsCount>,<Date>,<Time>]<FileCount>.

Where:

<FileCount> Number of file entries that follow

<FileNo> File number of this file entry

<PassingsCount> Number of passings in this file entry

<Date> Modification date of this file entry (format yyyy-mm-dd)

<Time> Modification time of this file entry (format hh:mm:ss)

Clear Files20

To clear all current files and move them to an archive directory, the host sends CLEARFILES<CrLf>. The decoder responds with

CLEARFILES;OK;<FileNo><CrLf>

if the decoder is in test mode and all files were archived. The decoder responds with

CLEARFILES;OPERATIONMODE<CrLf>

if it is in operation mode and no files were archived.

race|result Decoder Communication Protocol Version 2.0

race result AG | Joseph-von-Fraunhofer-Str. 11 | 76327 Pfinztal | Germany | www.raceresult.com page 21 of 28

Get File20

To get the content of a (non-archived) passings file, the host sends GETFILE;<FileNo>[;<S>[:<C>]]<CrLf>. Where:

<FileNo> File number of requested passings file.

<S> Start index into passings file

<C> Number of passings to transfer. (If omitted only a single passing is

returned.)

If both <S> and <C> are omitted, the whole file is returned. The decoder will respond with

GETFILE;ERROR<CrLf>

if the given file number is invalid. The decoder responds with

GETFILE;<FileNo><CrLf>

<PassingsData>

if the request is successful.

For further information refer to Get Single Passing, Get Multi Passing and Number of Passings sections.

Note: passing records are sent in the currently active protocol version. Random access into passing records is possible but not recommended, since implementation is optimized for sequential access.

race|result Decoder Communication Protocol Version 2.0

race result AG | Joseph-von-Fraunhofer-Str. 11 | 76327 Pfinztal | Germany | www.raceresult.com page 22 of 28

Get Firmware Version9

To get the firmware version that is currently active, the host sends GETFIRMWAREVERSION<CrLf>.

The decoder responds with:

GETFIRMWAREVERSION;<Version>

Where:

<Version> The current firmware version that is installed on the decoder.

Example:

← GETFIRMWAREVERSION<CrLf>

→ GETFIRMWAREVERSION;1.99<CrLf>

race|result Decoder Communication Protocol Version 2.0

race result AG | Joseph-von-Fraunhofer-Str. 11 | 76327 Pfinztal | Germany | www.raceresult.com page 23 of 28

Setting and getting config parameters5

In order to get/set a config parameter, the host can use GETCONFIG;<GROUP>;<SETTING>[;PARAMETERS] <CrLf> /

SETCONFIG;<GROUP>;<SETTING>;<PARAMETERS><CrLf> calls. Valid <GROUP>s are:

GENERAL Various general settings,

NETWORK network settings,

DETECTION detection menu settings,

ACTIVE configuration regarding the active extension,

CLIENTMODE client mode settings,

UPLOAD configuration of the upload functionality.

If the decoder cannot parse the parameters or the parameters are invalid, it responds with

SETCONFIG;<GROUP>;<SETTING>;ERROR.

General

Valid <SETTING>s are:

BOXNAME You can give the race|result Decoder a name. The name will be stored and

available after reboot.

Set <PARAMETERS>:

<NAME> Desired name.

Get response: GETCONFIG;GENERAL;BOXNAME;<Name>;<DeviceId>. Where <Name> is

the name of the box and <DeviceId> the ID of the decoder.

TIMEZONE9 Select a different time zone.

Set <PARAMETERS>:

<ZONE> Desired time zone.

Note that the decoder will respond with SETCONFIG;GENERAL;TIMEZONE;OPERATIONMODE

and will not change the time zone when it is currently active.

Get response: GETCONFIG;GENERAL;TIMEZONE;<ZONE>. Where <ZONE> is

the currently active time zone. A list of valid time zones is attached.

race|result Decoder Communication Protocol Version 2.0

race result AG | Joseph-von-Fraunhofer-Str. 11 | 76327 Pfinztal | Germany | www.raceresult.com page 24 of 28

Network

Valid <SETTING>s are:

TCPIP Set/get the TCP/IP settings.

Set <PARAMETERS> (separated by ;):

<Type> Either DHCP or STATIC.

[<IP>] Desired IP address, if <Type> == STATIC.

[<Netmask>] Desired net mask, if <Type> == STATIC.

[<Gateway>] Desired gateway address, if <Type> == STATIC.

[<Nameserver>] Desired name server address, if <Type> == STATIC.

Set response: SETCONFIG;NETWORK;TCPIP;<Type> [;<ConfiguredIP>;<ConfiguredNetmask>;

<ConfiguredGateway>;<ConfiguredNameserver>]S.

Get response: GETCONFIG;NETWORK;TCPIP;<Type>[;<ConfiguredIP>; <ConfiguredNetmask>;<ConfiguredGateway>;

<ConfiguredNameserver>]S;<ActualIP>;<ActualNetmask>;

<ActualGateway>;<ActualNameserver>.

Where parameters prefixed with Configured are the configured values. The values

prefixed with Actual are the actual settings used by the decoder.

Note: When changing the network settings, all TCP/IP connections may be

dropped even if the call does not result in an IP address change.

S When using a static configuration

race|result Decoder Communication Protocol Version 2.0

race result AG | Joseph-von-Fraunhofer-Str. 11 | 76327 Pfinztal | Germany | www.raceresult.com page 25 of 28

Detection9

Valid <SETTING>s are:

DEADTIME Dead time (for how long a single transponder is ignored after a detection).

Set <PARAMETERS>:

<Time> Desired dead time in ms (0 - 9999).

Set response: SETCONFIG;DETECTION;DEADTIME;<Time>.

Get response: GETCONFIG;DETECTION;DEADTIME;<Time>.

REACTIONTIME Reaction time (for how long a single passive transponder is observed to

determine the measured time).

Set <PARAMETERS>:

<Time> Desired reaction time in ms (0 - 9999).

Set response: SETCONFIG;DETECTION;REACTIONTIME;<Time>.

Get response: GETCONFIG;DETECTION;REACTIONTIME;<Time>.

NOTIFICATION Whether to beep, blink or do both whenever a detection occurs.

Set <PARAMETERS>:

<Value> One of either BEEP+BLINK, BEEP OR BLINK.

Set response: SETCONFIG;DETECTION;NOTIFICATION;<Value>.

Get response: GETCONFIG;DETECTION;NOTIFICATION;<Value>.

race|result Decoder Communication Protocol Version 2.0

race result AG | Joseph-von-Fraunhofer-Str. 11 | 76327 Pfinztal | Germany | www.raceresult.com page 26 of 28

Active

Valid <SETTING>s are:

POWER Loop power of the active extension.

Set <PARAMETERS>:

<Power> Desired power (1 - 100).

Set response: SETCONFIG;ACTIVE;POWER;<SelectedPower>[;<ActualPower>].

Get response: GETCONFIG;ACTIVE;POWER;<SelectedPower>[;<ActualPower>].

Where <SelectedPower> is the power that should be configured and

<ActualPower> the power that the active extension has actually set (only

available if active extension is connected).

CHANNEL Selected channel.

Set <PARAMETERS>:

<Channel> Desired channel (1 - 8 or AUTO).

Set response:

SETCONFIG;ACTIVE;CHANNEL;<SelectedChannel>[;<ActualChannel>]. Get response:

GETCONFIG;ACTIVE;CHANNEL;<SelectedChannel>[;<ActualChannel>]. Where

<SelectedChannel> is the channel that should be configured and

<ActualChannel> the channel that the active extension has actually set (only available if

active extension is connected).

LOOPID Selected loop id.

Set <PARAMETERS>:

<LoopId> Desired channel (1 - 8 or AUTO).

Set response: SETCONFIG;ACTIVE;LOOPID;<SelectedChannel>[;<ActualLoopId>].

Get response: GETCONFIG;ACTIVE;LOOPID;<SelectedLoopId>[;<ActualLoopId>].

Where <SelectedLoopId> is the loop id that should be configured and

<ActualLoopId> the loop id that the active extension has actually set (only available

if active extension is connected).

race|result Decoder Communication Protocol Version 2.0

race result AG | Joseph-von-Fraunhofer-Str. 11 | 76327 Pfinztal | Germany | www.raceresult.com page 27 of 28

Client Mode

Valid <SETTING>s are:

HOST;<HostNum> Set/get host entry <HostNum> (1 -> 10).

Set <PARAMETERS> (separated by ;):

<Configure> 1, if the host should be configured, 0 if the host should be

marked as not configured.

<Host> Name or IP of host to connect to.

<Port> Port to connect to.

<KeepAlive> Time in seconds, after the decoder reestablishes the

connection, if no command was received.

<AutoStart> Automatically establish connection after boot.

Set response: SETCONFIG;CLIENTMODE;HOST;<HostNum>;<Configure>; <Host>;<Port>;<KeepAlive>;<AutoStart>

Get response: GETCONFIG;CLIENTMODE;HOST;<HostNum>;<Configure>;

<Host>;<Port>;<KeepAlive>;<AutoStart>;<IsConnected>.

Where <IsConnected> is 1, if the connection is currently established, 0

otherwise.

USEUPLOADGPRSSETTINGS Specifies whether the decoder should use the upload connection settings

when connecting to a host. This can be used to use establish a

GPRS connection.

Set <PARAMETERS>:

<UseSettings> 1, if upload settings should be used, 0 (default) otherwise.

Set response: SETCONFIG;CLIENTMODE;USEUPLOADGPRSSETTINGS; <UseSettings>

Get response: GETCONFIG;CLIENTMODE;USEUPLOADGPRSSETTINGS;

<UseSettings> .

Upload

Valid <SETTING>s are:

CONNECTION Specify how the connection should be established when uploading

data through http.

Set <PARAMETERS>:

<Value> Either ETHERNET (if you want to use an Ethernet connection),

GPRS_AUTO (if you want to upload the data using

GPRS in auto- configure mode) or GPRS_MANUAL (if

GPRS should be used using the manual configuration).

race|result Decoder Communication Protocol Version 2.0

race result AG | Joseph-von-Fraunhofer-Str. 11 | 76327 Pfinztal | Germany | www.raceresult.com page 28 of 28

Attachments

Valid time zones (Version 1.9)

Pacific/Midway,America/Adak,Etc/GMT+10,Pacific/Marquesas,Pacific/Gambier,America/Anchor

age,

America/Ensenada,Etc/GMT+8,America/Los_Angeles,America/Denver,America/Chihuahua,

America/Dawson_Creek,America/Belize,America/Cancun,Chile/EasterIsland,America/Chicago,

America/New_York,America/Havana,America/Bogota,America/Caracas,America/Santiago,

America/La_Paz,Atlantic/Stanley,America/Campo_Grande,America/Goose_Bay,America/Glace

_Bay,

America/St_Johns,America/Araguaina,America/Montevideo,America/Miquelon,America/Godtha

b,

America/Argentina/Buenos_Aires,America/Sao_Paulo,America/Noronha,Atlantic/Cape_Verde,

Atlantic/Azores,Europe/Belfast,Europe/Dublin,Europe/Lisbon,Europe/London,Africa/Abidjan,

Europe/Amsterdam,Europe/Belgrade,Europe/Brussels,Africa/Algiers,Africa/Windhoek,Asia/Beir

ut,

Africa/Cairo,Asia/Gaza,Africa/Blantyre,Asia/Jerusalem,Europe/Minsk,Asia/Damascus,Europe/M

oscow,

Africa/Addis_Ababa,Asia/Tehran,Asia/Dubai,Asia/Yerevan,Asia/Kabul,Asia/Yekaterinburg,Asia/

Tashkent,Asia/Kolkata,Asia/Katmandu,Asia/Dhaka,Asia/Novosibirsk,Asia/Rangoon,Asia/Bangko

k,Asia/Krasnoyarsk,Asia/Hong_Kong,Asia/Irkutsk,Australia/Perth,Australia/Eucla,Asia/Tokyo,Asi

a/Seoul,Asia/Yakutsk,

Australia/Adelaide,Australia/Darwin,Australia/Brisbane,Australia/Hobart,Asia/Vladivostok,

Australia/Lord_Howe,Etc/GMT-11,Asia/Magadan,Pacific/Norfolk,Asia/Anadyr,Pacific/Auckland,

Etc/GMT-12,Pacific/Chatham,Pacific/Tongatapu,Pacific/Kiritimati