Can't connect using romi reference project

I copied and opened the wpi romi reference project in VSCode. I have made no changes to it. Following the instructions I chose “simulate robot code” in VSCode. Build looks good, but I don’t get the WS connected message. Instead I get repeated connection attempts.

I can connect to the ROMI using the WPILibPi Web tool and view its status, so I know it is on my wifi. Below is the terminal output from VSCode. Any suggestions why it is not connecting?

Thanks
–jon


Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Install the latest PowerShell for new features and improvements! Migrating from Windows PowerShell 5.1 to PowerShell 7 - PowerShell | Microsoft Learn

PS C:\Users\jonb\vscode-workspace\MyRomiReference> {env:HALSIM_EXTENSIONS}='C:\Users\jonb\vscode-workspace\MyRomiReference\build\jni\release\halsim_gui.dll;C:\Users\jonb\vscode-workspace\MyRomiReference\build\jni\release\halsim_ws_client.dll;C:\Users\jonb\vscode-workspace\MyRomiReference\build\jni\release\halsim_ws_server.dll;'; {env:PATH}='C:\Users\jonb\vscode-workspace\MyRomiReference\build\jni\release;C:\Windows\system32'; ${env:HALSIMWS_HOST}=‘10.0.0.2’; & ‘C:\Users\Public\wpilib\2024\jdk\bin\java.exe’ ‘-agentlib:jdwp=transport=dt_socket,server=n,suspend=y,address=localhost:56005’ ‘@C:\Users\jonb\AppData\Local\Temp\cp_6iinxnnxvjvcty1ixrht6kk09.argfile’ ‘frc.robot.Main’
HAL Extensions: Attempting to load: halsim_gui
Simulator GUI Initializing.
Simulator GUI Initialized!
HAL Extensions: Successfully loaded extension
HAL Extensions: Attempting to load: halsim_ws_client
HALSim WS Client Extension Initializing
HALSimWS Initialized
No WS Message Filters specifiedWill attempt to connect to ws://10.0.0.2:3300/wpilibws
Connection Attempt 1
HALSim WS Client Extension Initialized
HAL Extensions: Successfully loaded extension
HAL Extensions: Attempting to load: halsim_ws_server
Websocket WS Server Initializing.
Listening at http://localhost:3300
WebSocket URI: /wpilibws
No WS Message Filters specifiedWebsocket WS Server Initialized!
HAL Extensions: Successfully loaded extension
********** Robot program starting **********
NT: Listening on NT3 port 1735, NT4 port 5810
********** Robot program startup complete **********
Default simulationPeriodic() method… Override me!
Connection Attempt 2
Connection Attempt 3
Connection Attempt 4

I think I solved my problem. Has to do with resolving the correct IP address and plugging it into the build.gradle file. See my post.