FMS to Driver Station

UDP

Sent to the DS every 500ms on UDP port 1121 by the normal FMS, or to UDP port 1120 by the offseason FMS. Sending to 1120 causes the DS to display a prompt asking to approve FMS control, whereas sending to 1121 starts FMS control immediatley.

Field

Length

Type

Comment

Sequence Num

2

uint16

Comm Version

1

uint8

Only 0x00 has been observed

Control Byte

1

Control

Contains control bits

Request Byte

1

Request

Stays at 0x00, not used

Alliance Station

1

Alliance Station

Represents the station the DS connects to

Tournament Level

1

Tournament Level

What level of competition this is

Match Number

2

uint16

Represents the number of current match

Play Number

1

uint8

Increments if there’s a replay

Date

10

Date

Remaining Time

2

uint16

Time left in current mode

Tags

n

Tags

Offseason FMS has code for sending tags but none to send

Control

Field

Mask

Comment

E-Stop

x.......

0: Normal, 1: Emergency Stopped

Enabled

.....x..

0: Disabled, 1: Enabled

Mode

......xx

0: TeloOp, 1: Test, 2: Autonomous

Alliance Station

Computed by taking station [1, 3] and subtracting 1 for red, or adding 2 for blue. Color is Red if value < 3, else Blue. Position is value % 3 + 1

Tournament Level

Level

Value

Comment

Match Test

0

Only used during FMS setup for testing purposes

Practice

1

Qualification

2

Playoff

3

Date

Field

Length

Type

Comment

Microseconds

4

uint32

Second

1

uint8

Minute

1

uint8

Hour

1

uint8

In UTC?

Day

1

uint8

Month

1

uint8

0 is January

Year

1

uint8

Year (starting at 1900)

TCP

10.0.100.5, listening on TCP port 1750.

Field

Length

Type

Comment

Size

2

uint16

Including ID

ID

1

uint8

See table below (only of Size > 0)

Tags

n

Depends on tag type

Tags

ID

Tag

0x00

WPILib Version

0x01

RIO Version

0x02

DS Version

0x03

PDP Version

0x04

PCM Version

0x05

CANJag Version

0x06

CANTalon Version

0x07

Third Party Device Version

0x14

Event Code

0x19

Station Info

0x1a

Challenge Question

0x1c

Game Data

Versions all take the same format

Version

See above table for devices and their associated tag IDs. Seems only the “preferred” DS version is sent to the Driver Station.

Field

Length

Type

Comment

Status

n

string

<bad>, <good>, or <preferred>

Version

n

string

Event Code (0x14)

Field

Length

Type

Comment

Event Code

1 + n

string

Event name

Station Info (0x19)

Field

Length

Type

Comment

Alliance Station

1

Alliance Station

Station Status

1

Station Status

Station Status

Num

Status

Comment

0

Good

Sent if FMS Driver Station context is valid. Causes the DS to display “FMS Connected”

1

Bad

Sent if the Driver Station is plugged into the wrong station. Causes the DS to display “Wrong station. Go to X”

2

Waiting

Sent if FMS Driver Station context is invalid. Causes the DS to display “FMS Waiting”

Challenge Question (0x1a)

Field

Length

Type

Comment

Question

1 + n

string

Coolest robot EVER!!??

Random Value

2

uint16

Random number [1000, 2000] associated with the FMS Driver Station context

Offseason FMS allows for sending multiple questions, but the responses are only checked against the first one (as of 2018).

See the Challenge Response for possible responses.

Game Data (0x1c)

Field

Length

Type

Comment

Data

1 + n

string