Vscode does not see the roborio

We just set up our new RoboRio 2. We imaged the SDCard with BalenaEtcher, set up our team number. We configured a new Radio and was able to connect to the roborio’s network. We can ping the roborio. On our laptop’s web browser, we can also connect to the roborio and even logon as admin or lvuser. Driver Station said there is communication, Wifi is connected and IP assigned. Everything looks good so far. But when we try to compile and push code in vscode, it complained the following error. Did we miss some steps in our set up?
Driver Station reported IP:

Task :discoverroborio
Discovering Target roborio
admin @ roborio-492-FRC.frc-field.local: Failed resolution.
Reason: RuntimeException
Unknown Host
admin @ roborio-492-FRC.lan: Failed resolution.
Reason: RuntimeException
Unknown Host
admin @ null: Resolved but not connected.
Reason: RuntimeException
com.jcraft.jsch.JSchException: java.net.ConnectException: Connection refused: connect
admin @ roborio-492-FRC.local: Resolved but not connected.
Reason: TimeoutException
Discovery timed out.
admin @ roborio-492-FRC: Resolved but not connected.
Reason: RuntimeException
com.jcraft.jsch.JSchException: java.net.ConnectException: Connection refused: connect
admin @ Resolved but not connected.
Reason: RuntimeException
com.jcraft.jsch.JSchException: java.net.ConnectException: Connection refused: connect
admin @ Resolved but not connected.
Reason: RuntimeException
com.jcraft.jsch.JSchException: timeout: socket is not established
Run with --info for more details

Task :discoverroborio FAILED
Missing Target!
Are you connected to the robot, and is it on?
GradleRIO detected this build failed due to not being able to find “roborio”!
Scroll up in this error log for more information.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:discoverroborio’.

A failure occurred while executing edu.wpi.first.deployutils.deploy.target.discovery.TargetDiscoveryWorker
Target roborio could not be found at any location! See above for more details.

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

4 actionable tasks: 2 executed, 2 up-to-date

I’d suggest double checking if you’ve configured your radio properly, as a misconfigured radio could cause the robot to be connected but code not being able to be uploaded(Exact issue happened to us last year). If that does not work try connecting to the rio by its usb port.

1 Like

I’d try 2 things:

  • Make sure firewalls are turned off (Windows Defender has multiple settings that can affect connectivity and it likes to turn itself back on particularly when you install updates).

  • Directly connecting to the RoboRio with a USB A to B connector. This eliminates the radio from the equation. If this works, I’d check wifi network adapter settings – even run the trouble shooter as this sometimes fixes these types of issues without having to search too much for what setting is incorrect.


We actually tried USB first, same result. Web browser could access RoboRio at, Driver Station said there was communication but no code. Then vscode couldn’t find RoboRio. Because USB failed, then we decided to try using Wifi with a radio.
BTW, if it adds any value, we also tried using WinSCP to check the SD card boot image but WinSCP said SFTP port is not open, but FTP is. We then tried FTP, it said “Connection refused”. I am assuming vscode is probably pushing code to the robot by similar way. So, there must be something wrong with the configuration of the image. Double checking with the instructions on “how to image RoboRio2” doesn’t show anything about configuring the image. It seems we are doing everything the instructions said: remove SD card from Rio, insert into laptop, extract the image from the Imaging tool zip file via the SD button, using BalenaEtcher to flash the image, set the team number, plug the SD card back in the Rio and power it up. That’s all we did.

It shouldn’t be necessary to extract the zip. I’m also confused at the order of operations. You can only set the team number with the SD card plugged into the Rio and it powered up.

If you can’t ssh in, something is fundamentally broken either with the image or something on your computer is blocking outgoing ssh.

Vscode is actually only running gradle tasks. Gradle (via the wpilib gradlerio plugin) does the work of attempting the connection (and all other tasks such as deploying the code).

That said, I agree with @wits. Doubke check your windows firewall settings. Also check for other antivirus, firewall, VPN, etc software as those could get in the way as well.

Worth asking, you have confirmed you did install the 2023 image, correct? IE, you installed the new game tools so that you have the 2023 image ready to install on SD card?

Yes, it is the 2023 image. The imaging tool has a version of 23.0. It showed an SD image version of 2023_v3.1

Thanks for the hint. I might have set the team number while the SD card was in the laptop. If I did, it “allowed” it and probably did not do all the necessary “settings”. Since I am not sure what I did, I decided to re-image the SD card carefully this time. After re-inserting the SD card back in the Rio, web browser can access the Rio via and Driver Station said there was communication. Interestingly, the imaging tool could not find the Rio (via “Rescan”). I decided to connect to the Rio via WiFi and the imaging tool found the Rio this time. So, I have successfully set the team number and noticed it also uploaded JRE to the Rio. vscode now successfully deployed code to the Rio. Thank you.

Have you tried the roborio imaging tool ?
This should “scan and find” the roborio and output basic information . Once you know the IP you can go into the settings and do more , setting the correct ips for example ( 10.TE.AM.X ) for example format . Then in your driver station make sure youve set your team number and it should find it.

Thank you for the info. I have resolved my issues.

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