Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# Understanding the FMS Network Architecture

This article provides an overview of how the Field Management System (FMS) network is structured at FRC competitions. Understanding this architecture helps teams troubleshoot connectivity issues and design robust networking solutions for their robots.

.. note:: This article summarizes key information from the `FMS Whitepaper <https://fms-manual.readthedocs.io/en/latest/fms-whitepaper/fms-whitepaper.html>`__. For complete technical details, refer to the full whitepaper.

## Network Topology Overview

The FMS network is an Ethernet-based system that connects all robots, driver stations, and field equipment. The **Score Switch** connects the following components:

- **Field Router**: Connects to the FMS server and manages alliance networks
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In what way?

- **FMS Server**: Controls match flow and communicates with Driver Station software
- **Field Access Point (AP)**: Provides 6 GHz wireless connectivity to robots
- **Smart Router**: Manages external connectivity and network services

Robot-to-field communication uses a dedicated wireless access point operating in the 6 GHz band with 802.11ax (Wi-Fi 6E) to minimize interference from spectator devices.

## Team Network Isolation

The FMS network uses Virtual LANs (VLANs) to completely isolate each team's traffic. Each team's network contains **only** their robot, driver station, and the FMS server.

.. important:: Teams cannot communicate with other teams' robots or driver stations, even during the same match. This isolation protects against accidental interference and ensures fair competition.

## IP Addressing on the Field

When connected to FMS, teams use the standard ``10.TE.AM.xx`` addressing scheme:

**Field Network (DHCP Range):**
- Driver Station: ``10.TE.AM.20`` - ``10.TE.AM.199`` (assigned by FMS)
- Gateway: ``10.TE.AM.4``
- Subnet Mask: ``255.255.255.0``

**Robot Network (via Team Radio):**
- Robot Radio: ``10.TE.AM.1`` (static)
- roboRIO: ``10.TE.AM.2`` (DHCP from robot radio)
- Other robot devices: ``10.TE.AM.200`` - ``10.TE.AM.219`` (DHCP from robot radio)

.. note:: The Field Router does **not** provide DHCP services to robot devices. Your team's robot radio provides DHCP addressing for devices onboard the robot.

## Wireless Specifications

FMS wireless uses modern standards to ensure reliable connectivity:

- **Frequency Band**: 6 GHz exclusively (avoids 2.4/5 GHz congestion from phones, tablets)
- **Standard**: 802.11ax (Wi-Fi 6E)
- **Encryption**: WPA3 with AES encryption
- **Security Keys**: Unique per team, per event (teams configure radios using event kiosks)

.. warning:: Field staff devices use separate 2.4 GHz and 5 GHz networks. Robot radios must be configured for 6 GHz operation at competition.

## Network Security

FMS uses several techniques to isolate team networks:

1. **VLAN Isolation**: Each team's network is completely separated from other teams
2. **WPA3 Encryption**: Wireless traffic is encrypted with per-team keys
3. **Port Restrictions**: Only approved network ports are allowed through the field firewall (see :doc:`fms-ports-protocols`)

## How FMS Coordinates Robot Communication

Think of FMS as a conductor - it tells each Driver Station when to start and stop, but the Driver Station communicates directly with the robot to "make the music." FMS initially sets up the communication, like a conductor pairing musicians with their instruments.

When your robot connects to the field:

1. **Driver Station** connects to field via Ethernet or field AP, receives DHCP address from FMS
2. **Robot Radio** connects to 6 GHz field AP using team-specific WPA3 key
3. **roboRIO** receives DHCP address ``10.TE.AM.2`` from robot radio
4. **FMS Server** establishes connection with the Driver Station software and begins sending control packets to the Driver Station software
5. **Driver Station** sends control packets to the robot, corresponding to the FMS-commanded mode
6. **Robot** sends status information back to the Driver Station
7. **Driver Station** sends status information back to the FMS

The FMS tells your Driver Station what mode to use (auto/teleop/test) and when to enable/disable the robot, but your Driver Station and robot communicate directly with each other.

## Bandwidth Allocation

FMS allocates network bandwidth with the following limits:

- **Per Team**: 7 Mbps maximum
- **Total Field**: 42 Mbps (across all 6 robots)

Traffic is prioritized in this order:
1. Driver Station control packets (highest priority)
2. NetworkTables data
3. Camera streams and custom data (lowest priority)
Comment on lines +82 to +85
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should verify that this is true with the new radios- as of the 2025 season, I don't believe it was.


See :doc:`network-performance-optimization` for guidance on staying within bandwidth limits.

## Field vs. Pits Networking

**On the Field:**
- FMS provides DHCP for driver stations
- Robot radio provides DHCP for robot devices
- Field firewall restricts which ports can be used

**In the Pits:**
- Only your robot radio provides DHCP
- No FMS server present
- All ports are available for debugging

Your robot should work seamlessly in both environments if following standard :doc:`ip-configurations`.

## Key Takeaways

- Each team's network is completely isolated in its own VLAN
- FMS uses 6 GHz Wi-Fi 6E to avoid interference
- Your robot radio provides DHCP for robot devices; FMS provides DHCP for driver stations
- Bandwidth is limited to 7 Mbps per team with prioritized traffic types
- Standard ``10.TE.AM.xx`` addressing works on field and in pits

For port-specific information, see :doc:`fms-ports-protocols`. For performance optimization, see :doc:`network-performance-optimization`.
241 changes: 241 additions & 0 deletions source/docs/networking/networking-introduction/fms-ports-protocols.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,241 @@
# FMS Network Ports and Protocols

This article provides a reference for network ports and protocols used by the Field Management System (FMS) and common FRC software. Understanding these ports helps with firewall configuration, custom software development, and network troubleshooting.

.. important:: Port usage rules are defined in the FRC Game Manual (Rule R704 for 2024). Always consult the current year's manual for official requirements. The `FMS Whitepaper <https://fms-manual.readthedocs.io/en/latest/fms-whitepaper/fms-whitepaper.html>`__ provides additional technical details.

## Core Robot Communication Ports

These ports are used for essential robot operation and are always allowed:

.. list-table::
:header-rows: 1
:widths: 15 15 50 20

* - Port(s)
- Protocol
- Purpose
- Used By
* - 1110
- TCP
- Camera data (roboRIO)
- WPILib CameraServer
* - 1130
- UDP
- Dashboard-to-Robot control
- Driver Station, Dashboards
* - 1140
- UDP
- Robot-to-Dashboard status
- roboRIO, Dashboards
* - 1180-1190
- TCP/UDP
- Camera streams
- IP Cameras, Driver Station
* - 1735
- TCP
- SmartDashboard / Shuffleboard
- SmartDashboard, Shuffleboard
* - 5353
- UDP
- mDNS (multicast DNS)
- All devices (``roboRIO-TEAM-FRC.local``)
* - 5800-5810
- TCP/UDP
- Team custom use
- Custom team software

## NetworkTables Ports

NetworkTables uses multiple ports for different protocol versions:

.. list-table::
:header-rows: 1
:widths: 15 15 50 20

* - Port(s)
- Protocol
- Purpose
- Version
* - 1735
- TCP
- NetworkTables 3
- NT3 (legacy)
* - 5810
- TCP
- NetworkTables 4 (primary)
- NT4 (current)
* - 5810
- UDP
- NetworkTables 4 (discovery)
- NT4 (current)

.. note:: NetworkTables 4 is the current standard. NetworkTables 3 (port 1735) is maintained for backwards compatibility with older dashboards.

## Driver Station Ports

The Driver Station uses these ports to communicate with the roboRIO and FMS:

.. list-table::
:header-rows: 1
:widths: 15 15 50

* - Port
- Protocol
- Purpose
* - 1110-1115
- UDP
- FMS-to-Robot control
* - 1120-1125
- UDP
- Robot-to-FMS status
* - 1130
- UDP
- DS-to-Robot control packets
* - 1140
- UDP
- Robot-to-DS status packets
* - 1750
- TCP
- DS-to-roboRIO (webdash, imaging)

## Vision Processing Ports

Common ports used by vision processing systems:

.. list-table::
:header-rows: 1
:widths: 15 15 50 20

* - Port(s)
- Protocol
- Purpose
- Device
* - 1180-1190
- TCP/UDP
- MJPEG camera streams
- Axis cameras, roboRIO
* - 5800-5807
- TCP
- PhotonVision web interface
- PhotonVision coprocessor
* - 5800-5807
- TCP
- Limelight web interface
- Limelight camera

.. note:: Vision coprocessors also use NetworkTables (port 5810) to send targeting data to the robot.

## Web Interface Ports

These ports provide web-based configuration and monitoring:

.. list-table::
:header-rows: 1
:widths: 15 15 50

* - Port
- Protocol
- Purpose
* - 80
- TCP
- roboRIO Web Dashboard (HTTP)
* - 443
- TCP
- roboRIO Web Dashboard (HTTPS)
* - 5800-5810
- TCP
- Coprocessor web interfaces (PhotonVision, Limelight, etc.)

## Packet Prioritization

FMS prioritizes network traffic to ensure reliable robot control:

1. **Highest Priority**: Driver Station control packets (ports 1110-1115, 1130)

- Robot enable/disable commands
- Mode selection (auto/teleop/test)
- Joystick/gamepad data
- These packets are **never** dropped or delayed

2. **Medium Priority**: NetworkTables data (ports 1735, 5810)

- Sensor readings sent to dashboard
- Configuration values from dashboard
- Vision targeting information
- May be throttled if bandwidth limit exceeded

3. **Lowest Priority**: Camera streams and custom data (ports 1180-1190, 5800-5810)

- MJPEG video streams
- Custom telemetry data
- May be significantly throttled or dropped if bandwidth limit exceeded

.. important:: To ensure reliable robot control, keep NetworkTables and camera bandwidth low. See :doc:`network-performance-optimization` for optimization strategies.

## Protocol Details

**UDP (User Datagram Protocol)**
- Used for time-sensitive data (control packets, status updates)
- No guaranteed delivery, but lower latency
- Preferred for real-time robot control

**TCP (Transmission Control Protocol)**
- Used for reliable data transfer (NetworkTables, camera streams, web interfaces)
- Guaranteed delivery with automatic retransmission
- Higher latency than UDP

**mDNS (Multicast DNS)**
- Allows devices to be found by name (``roboRIO-TEAM-FRC.local``)
- Uses UDP port 5353
- No DNS server required
- Essential for DHCP networks where IP addresses may change

## Firewall Configuration

For PC-based tools (Driver Station, dashboards, imaging tools) to work properly, your firewall must allow:

- **All ports listed above** for the ``10.0.0.0/8`` IP range (``10.TE.AM.xx`` addresses)
- **UDP port 5353** for mDNS (for ``.local`` hostname resolution)
- **Link-local range** ``169.254.0.0/16`` (for direct connections without DHCP)

See :doc:`windows-firewall-configuration` for detailed firewall setup instructions.

## Port Usage Rules

.. warning:: The FRC Game Manual restricts which ports teams may use. Always verify port usage against the current year's rules (typically Rule R704).

**Generally Allowed:**
- Ports listed in the tables above (WPILib standard ports)
- Ports 5800-5810 for custom team use

**Restricted:**
- Ports outside the approved ranges may be blocked by FMS
- Using non-standard ports may prevent your robot from functioning on the field

## Common Port Issues

**Problem**: Dashboard can't connect to robot
- **Check**: Firewall blocking port 5810 (NT4) or 1735 (NT3)
- **Check**: mDNS not working (port 5353 blocked)

**Problem**: Camera stream not visible
- **Check**: Bandwidth limit exceeded (camera resolution too high)
- **Check**: Firewall blocking ports 1180-1190

**Problem**: Can't access roboRIO web dashboard
- **Check**: Firewall blocking port 80/443
- **Check**: Using HTTP (``http://10.TE.AM.2``) not HTTPS

For more troubleshooting guidance, see :doc:`roborio-network-troubleshooting`.

## Key Takeaways

- Driver Station control packets (ports 1110-1115, 1130) have highest priority
- NetworkTables 4 uses port 5810 (TCP/UDP); NT3 uses port 1735 (TCP)
- Camera streams (ports 1180-1190) are lowest priority and may be throttled
- mDNS (port 5353) is essential for ``.local`` hostname resolution
- Ports 5800-5810 are reserved for team custom use
- Always consult the current Game Manual for official port restrictions

For bandwidth optimization, see :doc:`network-performance-optimization`. For IP addressing details, see :doc:`ip-configurations`.
3 changes: 3 additions & 0 deletions source/docs/networking/networking-introduction/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ This section outlines basic robot configuration and usage relating to communicat

networking-basics
ip-configurations
fms-network-architecture
fms-ports-protocols
network-performance-optimization
roborio-network-troubleshooting
windows-firewall-configuration
measuring-bandwidth-usage
Loading