Updating webcam without Scanning

This is a question that was asked on another forum, and I decided to bring it here.

Is there a way to update the webcam on a Control Hub without rescanning? When I rescan the config to add a new webcam it wipes out my config!

Yes! However, it’s not as simple as simply “rescanning” the config.

If you plug a POWERED and RUNNING Control Hub into a Windows laptop via USB (USB-C on the Control Hub, USB-A via the laptop), you have access to the storage on the Control Hub via the Windows Explorer. You can manually edit the XML file of the config you want to update. However, webcams and expansion hubs both need the serial numbers in order to be identified and used properly, so you need to perform a scan in a new configuration in order to get the serial number (this is recommended, as it’s more fool-proof than trying to locate and hand-enter the serial number - but you do what you’re most comfortable with).

(1) Create a NEW robot configuration using the “Configure Robot” UI within the Driver Station App.
(2) Creating the new config will scan for devices, and you’ll find the new webcam.
(3) Save that config as “cam_temp”.
(4) Open the storage on the Control Hub.
(5) Browse to the /FIRST folder. You will find each configuration stored as a file within this folder - you’ll find the “cam_temp” config as “cam_temp.xml”.
(6) You’ll need to copy the serial number for the new webcam from within the “cam_temp.xml” file, the line will look something like:

  • <Webcam serialNumber="24E4B760" name="Webcam 1"/>

(7) You need to open the file for the config you want to update, and either replace the serial number or completely replace the webcam configuration line in the existing config (or create a copy of the old config file and replace the line with the new - your choice).
(8) Once you’ve updated and saved the config XML file, you need to restart the robot. On restart, the updated config will take effect.

With this knowledge, you can probably figure out how to:

  1. Copy configurations.
  2. Update configurations.
  3. Hand-edit configurations.
  4. Back-up and replace configurations.
  5. Delete configurations.

Enjoy!
-Danny