Can't control VMX-pi by using the FRC Driver Station

140 views
Skip to first unread message

alex ho

unread,
Aug 17, 2020, 10:09:25 PM8/17/20
to vmx-pi
Hello,

The other day when I was browsing the kauailabs website, I saw how to use the FRC Driver Station to control VMX-pi on here.
So I followed the steps here and here.
First of all, I supply power to VMX-pi, and then set the VMX-pi Robot’s Raspberry Pi to be configured in Wifi AP Mode, but even when the PC is connected to the wireless network created by raspberry pi, I still can't connect the VMX-pi to Driver Station PC.
In addition, I try to control the VMX-pi using Ethernet Connectivity, It still doesn't work.

Has anyone successfully tried to use Driver Station PC to connect to VMX-pi, please give me advice, thank you. I want to know if there is a problem with my steps.

Alex

Scott Libert

unread,
Aug 17, 2020, 10:18:34 PM8/17/20
to vmx-pi
Hi Alex,

Many people have successfully connected the Driver Station PC to VMX-pi.

There are several things that should be checked if there are troubles:

1) Ensure that the team number is correctly entered in the Driver Station.
2) Verify that from the Driver Station PC, you can ping the VMX-pi.  Often, this will fail because of Firewall or Virus software which is enabled in Windows on the Driver Station PC.  This is the number one reason for failures, so it's really important to ensure that Virus Software or Firewall Software is not causing problems.
3) Are you seeing any issues (displayed in VSCode's status windows) that indicate that the deployment of software to the VMX-pi is working correctly?  If this is not working, then the Driver Station PC may not be able connect to the robot software, because your robot application is not working.  One thing that sometimes causes trouble here is if the raspberry pi password has been changed from the default.

Once you have verified the 3 above, if you're still having troubles, then send (a) the VSCode status output from when you are deploying to the VMX-pi, and (b) the Driver Station Console logs.

jrothr...@hdsd.org

unread,
Aug 17, 2020, 10:34:32 PM8/17/20
to vmx-pi
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.

alex ho

unread,
Aug 17, 2020, 10:48:52 PM8/17/20
to vmx-pi
Hi,

I also try to connect roborio to PC via USB, the Driver Station can detect the roborio.
In the VS Code, I open VMX-pi Command Palette and select Change the deploy target to VMX-pi. And find error messages displayed in VSCode's status windows.

4.png

I'll try to turn off the firewall of the computer. Thank you for your advice.


Cheers

Alex



在 2020年8月18日星期二 UTC+8上午10:18:34,Scott Libert写道:

jrothr...@hdsd.org

unread,
Aug 17, 2020, 10:55:03 PM8/17/20
to vmx-pi
I think you need to be connected to the Internet in order to switch from Roborio to VMX-Pi. I cannot understand the actual error in your build, but if you croll up, you should get a more meaningful error with the specific thing that caused the compile error. I can say that I have successfully run and driven a CPP program on our VMX-Pi so it is possible. Mine failed in a similar manner the first time, but I ensured I was connected to the Internet and then built the project before deploying it, and it worked.

alex ho

unread,
Aug 20, 2020, 2:12:33 AM8/20/20
to vmx-pi
Hello,

I have made new progress. Now my VS Code project is successfully configured for VMX-Pi C++ usage.
And I can ping the VMX-Pi from both terminal and cmd. By the way, is there any requirement for the team number?

But unfortunately, even though I can ping the VMX-Pi, the code could not be deployed yet.

Thanks
Alex

在 2020年8月18日星期二 UTC+8上午10:34:32,jrothr...@hdsd.org写道:

Scott Libert

unread,
Aug 20, 2020, 3:34:39 PM8/20/20
to vmx-pi
Glad to hear you're making progress.  Verifying that Ping works is a good step forward; Ping is a great tool that can always be used to verify basic network communication.

> By the way, is there any requirement for the team number?

Yes.  The team number configured on VMX-pi must match the team number entered in VSCode to deploy.  Also, the team number entered in the Drive Station configuration must match the VMX-pi, in order to connect from the Driver Station.

When using Wifi to communicate with VMX-pi, the team number is the 2nd and 3rd octets of the IP address.  For example, if the VMX-pi IP address is 10.23.45.2, the team number is 2345.  This is discussed in the "Raspberry Pi Network Configuration for FRC" documentation.

What is your VMX-pi IP address - and what is your team number?

Also, It's highly recommended to review the "Controlling a VMX-pi FRC robot using the FRC Driver Station" documentation; this discusses the IP addressing the Driver Station uses to communicate with VMX-pi.

> But unfortunately, even though I can ping the VMX-Pi, the code could not be deployed yet.

We're happy to help, but more information would be very helpful.

Clues to why deployment might fail are typically found logs that are created in VSCode when deploying.  Without those clues, we can only offer these general tips:

- Have you verified that the Raspberry Pi name/password is still set to the default (see this note on the "VMX_FRC Raspberry Pi Software Configuration" page)?

- Have you verified that any virus/firewall software - which might be prohibiting communication between your development computer and Raspberry Pi - is disabled?  [Virus/Firewall software can still stop deployment to the VMX-pi, even if Ping is working.]

The more you can send logs that provide details on errors, the more precise we can be with troubleshooting suggestions.

Cheers,

- scott

Scott Libert

unread,
Aug 20, 2020, 4:24:11 PM8/20/20
to vmx-pi
We've added a new "Troubleshooting" page to the VMX-pi software section, which covers the items discussed so far in this thread, with links to supporting documentation.

Hopefully, you'll find this helpful.

Cheers,

- scott

Scott Libert

unread,
Aug 20, 2020, 4:25:20 PM8/20/20
to vmx-pi
Here's the link to the new Troubleshooting section.

alex ho

unread,
Aug 25, 2020, 3:56:01 AM8/25/20
to vmx-pi
thank you, it helps me a lot

在 2020年8月21日星期五 UTC+8上午4:25:20,Scott Libert写道:
Reply all
Reply to author
Forward
0 new messages