We’re running the vision processing code on the Raspberry Pi and have gotten the processed stream onto the RPi dashboard, but cannot write values to NetworkTables. In the vision status console, it sends error messages upon code initialization:
NT: ERROR: connect() to 172.22.11.2 port 1735 error 101 - Network is unreachable (TCPConnector.cpp:185)
NT: ERROR: could not resolve roboRIO-6520-FRC.lan address (TCPConnector.cpp:99)
Do you know how to fix this problem? I have a feeling it might have something to do with how the radio is configured, but I’m not sure.
NT running as a client tries a bunch of different addresses. Do you see a “NT: CONNECTED” message? If so it’s connected despite the other ERROR messages. If you don’t see a CONNECTED message the most likely cause is that mDNS isn’t working-- the easiest workaround is to set your roboRio to 10.xx.yy.2 static IP.
I’ve gotten it to connect before, but now it can’t. About the RoboRIO address, I can access the system dashboard through 10.65.20.2 so I assume it has been set?
I haven’t used the image that much, and I’m not exactly qualified to answer. But since it’s trying to connect to the USB address I would try connecting it to the Rio over USB and see if that works then debug from there.
No, this won’t work, as Linux doesn’t have the right setup to talk to the Rio this way. The reason NT is trying to connect to the USB address is that we often run the client on desktops where that is a useful address. Its attempts to connect via that method from the rPi should be ignored.
What is your network setup? The roboRio should be getting the .2 address assigned by the radio, but I suspect this is sometimes not happening. Setting the roboRio to static is guaranteed to keep it at that address. As the rPi tries the .2 address as one of the servers, if the roboRio is there and both are on the same Ethernet segment I see no reason why it couldn’t connect. Again, all you need is one “NT: CONNECTED” message and it’s safe to ignore the other connection attempt errors.