-
Notifications
You must be signed in to change notification settings - Fork 71
Advanced Networking Concepts
Cheesy Arena has support for advanced network security. This mode of operation isolates each team on the field to its own virtual LAN and wireless SSID, making it more difficult for teams or audience members to interfere in the communications of other robots.
The FRC control system operates by this mechanism: the driver station sends a control packet to the robot, and the robot responds with a status packet; this happens 50 times per second. The mechanism is the same whether operating standalone, or connected to the field management system on an FRC field. What changes on an FRC field is that the FMS is sending control packets to the driver station, and the driver station is responding with status packets, in addition to the DS-robot communication. The FMS control packets indicate which enable/disable and auto/teleop modes the robot should operate in, and the DS status packets contain information about the robot link status, as well as the battery voltage, trip time, and other statistics. The FMS never communicates directly with the robot, but receives information about it from the driver station.
In order to securely operate six robots at a time on the playing field, the FMS needs to provide six virtual local area networks (VLANs) between the driver stations and robot radios; in addition, the FMS needs to be able to talk to each of the driver stations. This calls for a fairly complicated network setup, using an access point and a managed switch.
At the start of an event, each team's radio needs to be programmed with a unique SSID (the team number) and WPA key (a random eight-character alphanumeric string). When each match is loaded, the access point tears down its previous configuration and sets up six SSIDs, using the team numbers and WPA keys for the six teams in the match. Contrary to popular belief, only one wireless network is present and broadcasting on one channel; the six SSIDs are multiplexed over that channel. Each SSID is mapped to a unique VLAN corresponding to one of the six alliance stations, and the Ethernet cable that runs from that alliance station, that the driver station is plugged into, to the managed switch, connects to a port that is mapped to the same VLAN. In this way, the driver station and robot can communicate privately, without having access to the other team's VLANs. However, when the FMS sends a control packet to one of the driver stations, the managed switch is able to route it between VLANs to the correct endpoint.
Before each match, the FMS reconfigures the access point and switch for the specific teams that are on the field. The AP is configured via an HTTP API with the team SSIDs and WPA keys, while the switch is configured via Telnet with the team VLAN interfaces and DHCP pools.