I’ve heard that several teams have recommended Ethernet switches for their robots in threads earlier this year. Why are Ethernet switches such a good idea and how do they work? Also how would I power one if it is not compatible with the VRM?
If you need to ask you probably don’t want one. They are used to interface extra TCP/IP devices via Ethernet to the Rio and or the radio. For example you might have an IP camera and a raspberry pi. The radio only had two ports and you probably want to keep one free for tethering, which means you need a switch off you have those extra devices.
How you power can vary, but generally either using the VRM or some other voltage regulator, the final answer depends on the switch’s power requirements and your robot.
Not quite sure why you would say this. There are some things that I agree need a lot of research before you even try, but ethernet switches aren’t particularly hard to set up or use. As long as you check the power requirements and get a suitable regulator, power supply shouldn’t be an issue. After that, most switches are basically just plug and play. Sure you can then get into static IPs and all that jazz for whatever coprocessors you have plugged into the switch, but that is different from using the switch itself.
I agree about making sure that the roboRIO is connected directly to the radio, as it removes a point of failure. Especially now that the radio firmware is (hopefully) fixed so both ports always work.
Not quite sure why you would say this…[/quote]
I’m guessing that he said that because an ethernet switch is not a goal- it’s not a feature that you explore because you want it. It’s a feature that enables some other feature you actually want.
Sorry if I came off snarky. What I meant is if you have external Ethernet devices you probably already have a switch or understand why you would want one and if you don’t have any external devices you don’t need a switch.
Sorry again if about my tone, trying to joke on the internet is rarely a good idea.
We used a switch this year because we had the radio to rio, 2 cameras, a tether dongle, and of course the ethernet that goes from the radio to the switch.
I actually spent a long time today doing some “robot networking” and realized that because the Rio is linux based, it would automatically register ethernet over usb devices.
I used a cheap $20 Anker usb to ethernet adapter and could see the robot with the driverstation.
This adapter gives you 3 usb ports and and eth port; you could put two in and have 3 free network adapters on your robot. If you’re willing to drop the extra cash, you could do 5 free network ports on your robot without a network switch.
If this is true (not that I have any reason to doubt you, other than I’m a generally skeptical person), that would be a great discovery to decrease the overhead of using coprocessors and IP cameras. I would be very happy to see if someone could test plugging a coprocessor into a dongle in the roboRIO and see if it shows up on the network.
So there are some reasons not to do it this way. Specifically, USB devices use the CPU to process commands. This means more work on the RoboRIO CPU.
Additionally, it opens up some weird networking issues with DHCP and static IPs as well as which default gateway ends up being used by the RIO. This happens when a device has multiple routes to choose to send a packet down.
Also, while the RoboRIO might run Linux, that’s not why this works. It works because there are pre-built and installed kernel modules for the adapter being used. Not all Ethernet USB adapters will have this support.
I’m not saying this can’t be done but I don’t think it’s the most strategic choice for additional networking ports.
EDIT: One other thing - there might be 5 ports but all of that network traffic would now need to pass through the roboRIO or only travel to/from it since it is now the central point for all traffic. This results in either making the roboRIO a router basically and it doesn’t have special hardware for it… though the thought of doing deep packet inspection on the roboRIO does amuse me greatly.