![frc driver station java frc driver station java](https://slideplayer.com/slide/9697732/31/images/29/Software+Installation+Packaging.jpg)
When your computer wants to know who owns an mDNS service, it sends out a request over multicast (multicast is the ‘m’ in ‘mDNS’), and if a computer responds to that, it sends a response back. Thankfully, I knew already that mDNS works on a request-response type system. The Hard Wayįirst, I had to figure out how the mDNS packet format worked.
FRC DRIVER STATION JAVA WINDOWS
To register this on the command line of a bonjour-enabled windows computer, we can use dns-sd -R roborio-#-frc _ni._tcp local 3580, which will allow the computer’s bonjour server to listen for discovery requests to this service and reply with the current computer. Finally, the port we’re going to use is 3580. The domain is local, which is fairly standard in the world of mDNS. The type is _ni._tcp, with _ni belonging to National Instruments, the manufacturers of the RoboRIO. Let’s look at our friend: The RoboRIO.įor our RoboRIO, roborio-#-frc is the name of the service. Each service has a name, a type, a domain and a port. MDNS uses services in order to broadcast information about different devices. This is how the Driver Station communicates with your robot, through UDP to be exact, with a separate TCP channel being used to pass log messages, fault status and joystick descriptors (actually joystick values are passed through UDP). When you enter your team number into the Driver Station, it tries to connect to a lot of different hosts, including: How does FRC use mDNS?įRC uses mDNS to provide a path from the Driver Station to the RoboRIO. Toast C++ will now broadcast its own mDNS service that the Driver Station can connect to immediately. RollYourOwn™ mDNS implementation (well, I guess).Exec a command to dns-sd (still requires bonjour, doesn’t work on linux, and is basically identical to the Toast Java implementation).Use the bonjour SDK (eww, it requires me to link a system library, it’s not cross platform and generally just not a fun time).Well, for Toast C++ I decided to try and fix this. In Toast Java, the Driver Station communications didn’t follow those last two points. It can’t have external dependencies outside of the bundled software.It has to work when the Driver Station is on a different computer.It has to work with the official FRC Driver Station.When I wrote Toast for Java, I had a master plan for the simulation environment, and it had to fit the following agenda: Writing your own mDNS implementation to hack the FRC Driver Station