Communication Error Between Raspberry Pi/roboRIO

While configuring our team’s Raspberry Pi to do vision processing, I’ve been repeatedly given the following readout by the WPILib FRCVision console:


Waiting 5 seconds…

Setting up NetworkTables client for team 386

config error in ‘/boot/frc.json’: could not read camera name

Starting camera ‘USB Camera 0’ on /dev/video0

CS: USB Camera 0: Connecting to USB camera on /dev/video0

NT: ERROR: select() to 172.22.11.2 port 1735 error 101 - Network is unreachable (TCPConnector.cpp:173)
NT: ERROR: select() to 10.3.86.2 port 1735 error 111 - Connection refused (TCPConnector.cpp:173)

NT: ERROR: select() to roboRIO-386-FRC.local port 1735 error 111 - Connection refused (TCPConnector.cpp:173)

CS: USB Camera 0: SetConfigJson: setting video mode to pixelFormat 1, width 100, height 100, fps 15

CS: USB Camera 0: Connecting to USB camera on /dev/video0

CS: USB Camera 0: set format 1 res 100x100

CS: USB Camera 0: set FPS to 15

CS: USB Camera 0: SetConfigJson: setting brightness to 50

CS: USB Camera 0: SetConfigJson: setting white balance to auto

CS: USB Camera 0: SetConfigJson: setting exposure to auto

CS: USB Camera 0: SetConfigJson: setting property ‘connect_verbose’ to 1

CS: USB Camera 0: SetConfigJson: setting property ‘contrast’ to 50

CS: USB Camera 0: SetConfigJson: setting property ‘saturation’ to 44

CS: USB Camera 0: SetConfigJson: setting property ‘hue’ to 50

CS: USB Camera 0: SetConfigJson: setting property ‘gamma’ to 100

CS: USB Camera 0: SetConfigJson: setting property ‘gain’ to 0

CS: USB Camera 0: SetConfigJson: setting property ‘power_line_frequency’ to 2

CS: USB Camera 0: SetConfigJson: setting property ‘sharpness’ to 0

CS: USB Camera 0: SetConfigJson: setting property ‘backlight_compensation’ to 1

CS: USB Camera 0: SetConfigJson: setting property ‘exposure_auto_priority’ to 1

NT: ERROR: select() to 10.3.86.2 port 1735 error 111 - Connection refused (TCPConnector.cpp:173)

NT: ERROR: select() to roboRIO-386-FRC.local port 1735 error 111 - Connection refused (TCPConnector.cpp:173)

NT: connect() to 172.22.11.2 port 1735 timed out

NT: ERROR: select() to 10.3.86.2 port 1735 error 111 - Connection refused (TCPConnector.cpp:173)

NT: ERROR: select() to roboRIO-386-FRC.local port 1735 error 111 - Connection refused (TCPConnector.cpp:173)

NT: connect() to 172.22.11.2 port 1735 timed out

NT: ERROR: could not resolve roboRIO-386-FRC.frc-field.local address (TCPConnector.cpp:99)

NT: ERROR: select() to 10.3.86.2 port 1735 error 111 - Connection refused (TCPConnector.cpp:173)

NT: ERROR: select() to roboRIO-386-FRC.local port 1735 error 111 - Connection refused (TCPConnector.cpp:173)

NT: connect() to 172.22.11.2 port 1735 timed out

NT: ERROR: select() to 10.3.86.2 port 1735 error 111 - Connection refused (TCPConnector.cpp:173)

NT: ERROR: select() to roboRIO-386-FRC.local port 1735 error 111 - Connection refused (TCPConnector.cpp:173)

NT: connect() to 172.22.11.2 port 1735 timed out

NT: ERROR: select() to 10.3.86.2 port 1735 error 111 - Connection refused (TCPConnector.cpp:173)

NT: ERROR: select() to roboRIO-386-FRC.local port 1735 error 111 - Connection refused (TCPConnector.cpp:173)

NT: connect() to 172.22.11.2 port 1735 timed out

NT: ERROR: select() to 10.3.86.2 port 1735 error 111 - Connection refused (TCPConnector.cpp:173)

NT: ERROR: select() to roboRIO-386-FRC.local port 1735 error 111 - Connection refused (TCPConnector.cpp:173)

NT: connect() to 172.22.11.2 port 1735 timed out

NT: ERROR: select() to 10.3.86.2 port 1735 error 111 - Connection refused (TCPConnector.cpp:173)

NT: ERROR: could not resolve roboRIO-386-FRC.lan address (TCPConnector.cpp:99)

NT: ERROR: select() to roboRIO-386-FRC.local port 1735 error 111 - Connection refused (TCPConnector.cpp:173)


Any advice is much appreciated- everything seems to be configuring correctly at the beginning except the name (I don’t know how much of an impact this has, if any), and a connection can’t be established with the roboRIO.

Thank you in advance from 386!

The problem is it trying to connect to the NetworkTables server. It first tries “172.22.11.2” which should not be an address on your robot (is this on a test bench). After that, it tries “10.3.86.2” and “roboBIO-386-FRC.local” both of which should point to your Rio, but that address refuses to talk.

So:

  • is this on the robot? If so, check your configuration for that “172” address. It is probably wrong.
  • You need to check the Rio as to why it will not answer on the NetworkTables port (1735). Is the robot code running? Has something turned off the NT server?

Hope this helps.

I’ll try both tomorrow and see- fingers crossed!

The 172.22.11.2 address is the address the roboRIO gets when connected via USB on Windows. It’s included in the default list for the NT client because that’s a common use case, but in this case can safely be ignored. The problem is more likely to be that robot code is not running so there’s no NT server to connect to.

This was the problem, and I’m up and running now- thank you so much!

I am having similar problems and can’t understand why.

My console prints on the frcvision.local/ looks like this:

Waiting 5 seconds…

Setting up NetworkTables client for team 1247

Starting camera ‘rPi Camera 0’ on /dev/video0

NT: ERROR: select() to 172.22.11.2 port 1735 error 101 - Network is unreachable (TCPConnector.cpp:173)

NT: ERROR: could not resolve roboRIO-1247-FRC.lan address (TCPConnector.cpp:99)

NT: client: CONNECTED to server 10.12.47.2 port 1735

CS: rPi Camera 0: Connecting to USB camera on /dev/video0

CS: rPi Camera 0: SetConfigJson: setting video mode to pixelFormat 1, width 160, height 120, fps 30

NT: ERROR: could not resolve roboRIO-1247-FRC.frc-field.local address (TCPConnector.cpp:99)

I am using a raspberry pi ethernet to the roborio with the standard pi Camera and uploading a custom jar file through the frcvision.local/ interface. My roborio is flashed with the 2019 firmware and its ip is 10.12.47.2
I’m not exactly sure how the NT is supposed to work. Is there any code i need to push to the roborio to initiate the NT that communicates with the pi. Also, the pi isn’t getting to the point where it runs any of my java jar files(won’t print the first line)?
Any help is appreciated.

This means NetworkTables is connected. You can ignore the other error messages, that’s just NT trying to connect to other addresses.

What option did you select on the Application tab? It should be “Uploaded Java jar”; when you uploaded did you upload the -all.jar file?

Also, you’re using 2019.3.1 image/example correct?

I completely reflashed the pi and ran the (must be built to work) example.
The console print was showing this:

Error: Unable to access jarfile build/libs/java-multiCameraServer-all.jar

Waiting 5 seconds…

Error: Unable to access jarfile build/libs/java-multiCameraServer-all.jar

Waiting 5 seconds…

Error: Unable to access jarfile build/libs/java-multiCameraServer-all.jar

Waiting 5 seconds…

The java-multicameraserver-all.jar file is on my computer pi file but not in the 2019 pi image. Should copy over my computer java-multicameraserver folder, which was were I started.
FileZilla shows that the pi’s java-multicameraserver is the following:
folder-gradle
folder-scr
file-build.gradle
file-gradlew
file-gradlew.bat
file-install.sh
text-LISCENSE.txt
text-README.txt
file-runCamera

My computer’s java-multicameraserver looks like this:
folder-.gradle
folder-.settings
folder-.vscode
folder-bin
folder-build
folder-gradle
folder-src
file-.classpath
file-.project
file-build.gradle
jar file-cameraserver
jar file-cscore
file-gradlew
Win Batch File-gradlew
file-install.sh
jar file-ntcore
jar file-opencv-344
text-README.txt
file-runCamera
jar file- wpiHal
jar file-wpilibj
jar file- wpiutil

My Main.java files are in the src folder and the java-multicameraserver-all.jar that the console outputs say I was missing is in the folder on my computer /build/libs

I’m a little confused, did you build it on the Pi or build it on your computer? I recommend building on your computer. If you build it on your computer from the example .zip download on the Application page, you don’t need to scp anything; you need to go to the Application tab, select the Uploaded Java jar option, click Browse… and select the locally built multiCameraServer-all.jar file, and click “Upload and Save”.

I saved the java files on my pi in the src folder, I have the entire folder on the pi. Then I select, run uploaded jar file and click the computer version of java-multicameraserver-all.jar that is also on the pi.

For what it’s worth, we see this type of problem with a Raspberry Pi 4, but not 3.

Using a model 3, the Java program running on the Pi finds the network table on the RIO, with log messages like this

NT: ERROR: select() to 172.22.11.2 port 1735 error 101 - Network is unreachable
NT: ERROR: could not resolve roboRIO-2393-FRC.lan address
NT: client: CONNECTED to server 10.23.93.2 port 1735

When using the same SD memory card in a model 4, we see the first 2 error messages, but never the last “CONNECTED” message.
Tried to avoid the first two errors by replacing ntinst.startClientTeam(team) with ntinst.startClient("10.23.93.2") so that it uses only that one address, but still get the error messages and no “CONNECTED”.

This is with v2020.1.1-beta-2.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.