Driver Station to FMS

UDP

Sent to 10.0.100.5 UDP port 1160 (from UDP port 1145).

Field

Length

Type

Comment

Sequence Num

2

uint16

Comm Version

1

uint8

Only 0x00 has been observed

Status Byte

1

Status

Contains control bits

Team Num

2

uint16

Battery

2

Battery

Battery voltage

Tags

N

Tags

Status

Field

Mask

Comment

E-Stop

x.......

0: Normal, 1: Emergency Stopped

Robot Comms Active

..x.....

0: No, 1: Yes

Radio Ping

...x....

0: No, 1: Yes

Rio Ping

....x...

0: No, 1: Yes

Enabled

.....x..

0: Disabled, 1: Enabled

Mode

......xx

0: TeleOp, 1: Test, 2: Autonomous

Reserved

.x......

Battery

Received as a uint16, XXYY. Voltage is calculated by: XX + YY/256

Tags

Field

Length

Type

Comment

Size

1

uint8

ID

1

uint8

See table below

Data

n

Depends on tag type

ID

Packet Type

0x00

Field Radio Metrics

0x01

Comms Metrics

0x02

Laptop Metrics

0x03

Robot Radio Metrics

0x04

PD Info

Field Radio Metrics (0x00)

Field

Length

Type

Comment

Signal Strength

1

uint8

Bandwidth Utilization

2

uint16

Comms Metrics (0x01)

Field

Length

Type

Comment

Lost Packets

2

uint16

Sent Packets

2

uint16

Average Trip Time

1

uint8

Laptop Metrics (0x02)

Field

Length

Type

Comment

Battery Percent

1

uint8

CPU Percent

1

uint8

Robot Radio Metrics (0x03)

Decompiling the Offseason FMS code shows “Robot Radio Metrics” in the enum, and a “UDPTagBridgeWifiMetrics”. Neither of which are used or handled, but I assume they are the same thing.

Field

Length

Type

Comment

Signal Strength

1

uint8

Bandwidth Utilization

2

uint16

PD Info (0x04)

Seems to be empty for now

Field

Length

Type

Comment

TCP

Sent to 10.0.100.5 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

0x15

Usage Report

0x16

Log Data

0x17

Error and Event Data

0x18

Team Number

0x1b

Challenge Response

0x1c

DS Ping

Versions all take the same format

Version

See above table for devices and their associated tag IDs.

Field

Length

Type

Comment

Status

n

string

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

Version

n

string

Usage Report (0x15)

Field

Length

Type

Comment

Team Num

2

uint16

Unknown

1

uint8

Entries

n

Entry Data

See Usage Reporting for details about the Entries format.

Log Data (0x16)

Field

Length

Type

Comment

Trip Time

1

uint8

This is round trip time, actual trip time is half of this

Lost Packets

1

uint8

Voltage

2

Battery

XXYY, XX + YY / 256

Robot Status

1

Status

CAN

1

uint8

Value is halved

SignalDb

1

uint8

Value is halved

Bandwidth

2

Bandwidth

round(float(uint16) / 256, 2)

Status

Field

Mask

Comment

Brownout

x.......

Watchdog

.x......

DS TeleOp

..x.....

DS Auto

...x....

DS Disable

....x...

Robot TeleOp

.....x..

Robot Auto

......x.

Robot Disable

.......x

Error and Event Data (0x17)

Field

Length

Type

Comment

Message Count

4

uint32

Number of messages to process

Timestamp

8

uint64

Number of seconds since 1904/01/01 00:00:00 GMT

Unknown

8

86 48 b0 00 00 00 00 00

Log Message

4 + n

string

Team Number (0x18)

Sent immediately upon TCP connection. Sending this triggers a challenge response.

Field

Length

Type

Comment

Team Num

2

uint16

Looks like it takes over the FMS’s Driver Station context associated with that team number. Would probably be bad to send another team’s number from your own station

Challenge Response (0x1b)

Used to verify if the Driver Station is “official”. Trivial to figure out the correct response from the off-season FMS, which isn’t incredibly useful.

Field

Length

Type

Comment

Response

n

string

As of 2017, there’s 23 possible responses. These change year to year.

ID

Response

0

Johnny Five

1

Data

2

ED-209

3

Bishop

4

NXT

5

Optimus Prime

6

Roomba

7

Rosie

8

The Terminator

9

HAL 9000

10

Sojourner

11

R2-D2

12

C-3PO

13

Wall-E

14

Curiosity

15

Opportunity

16

Spirit

17

Cylons

18

Stinky

19

Iron Giant

20

RCX

21

EV3

22

ASIMO

The correct response uses the Random Value sent by the Challenge Question.

id = ( (team number) * (random value) ) % 23

DS Ping (0x1c)

Just an empty tag. Sent by DS to FMS as a heartbeat.

Field

Length

Type

Comment