Hello,
Scott beat me to the post, but I have a few things to add.
Once you follow the VMX-pi specific directions for networking, follow the WPILib
Benchtop test directions to get communication going for the driverstation. You can also type an IP address into the driverstation instead of your team number.
I am assuming you were able to deploy your project. If not, that is your problem. The Driver Station cannot show a connection status unless there is a running robot program.
When things go awry, I first make sure I can ping the robot using a terminal (you can use the terminal in VSCode).
Then, I make sure I can load code onto the robot.
Then, I look at the driverstation
log to make sure the code did not crash. Despite the two separate indicators, I find, if my code crashed, the driverstation does not usually show connectivity.
Frequently, one of these will help me figure out the problem. There is another potential issue. If your robot is running off of a battery, and the VMX-Pi is underpowered, there is a point in which, you will see lights on the VMX, but have no communication. I feel our team experiences this more than most people because one of our bots uses a 7.4 Volt system. When those batteries start to dwindle, there is not much juice left for the VMX.
This is not an issue specific to the VMX-Pi or even Java and CPP in WPILib. We had major connection issues at all of our events in the first two years of competition, and we were using LabView at the time.