Skip to content

Instantly share code, notes, and snippets.

@joeybeninghove
Created January 16, 2025 23:56
Show Gist options
  • Save joeybeninghove/4df522a6fa0e06858b8151cc6df87b37 to your computer and use it in GitHub Desktop.
Save joeybeninghove/4df522a6fa0e06858b8151cc6df87b37 to your computer and use it in GitHub Desktop.
Wirelessly Deploy Code to Rev Robotics Control Hub

To wirelessly connect to a Rev Robotics Control Hub and compile/deploy code from Android Studio using ADB (Android Debug Bridge), follow these steps:


Prerequisites

  1. Ensure Android Studio is installed and configured on your computer.
  2. Make sure your FTC Robot Controller app is set up on the Control Hub.
  3. Install ADB on your computer (if not already included with Android Studio).

Step-by-Step Guide

1. Connect to the Control Hub’s Wi-Fi

  • Turn on the Rev Robotics Control Hub.
  • Open your device's Wi-Fi settings.
  • Connect to the Control Hub's Wi-Fi network:
    • The network name (SSID) is usually in the format “FTC-XXXX”, where XXXX is a unique identifier.
    • The default password is “password”, unless it has been changed.

2. Enable Wireless Debugging on the Control Hub

  1. Connect the Control Hub to your computer using a USB cable.
  2. Open a terminal or command prompt and check the device connection:
    adb devices
    Ensure the Control Hub appears in the list of connected devices.
  3. Enable TCP/IP mode for ADB on the Control Hub:
    adb tcpip 5555
    This command restarts ADB in TCP/IP mode, allowing wireless debugging.

3. Determine the Control Hub’s IP Address

  • Open a browser and navigate to the Control Hub’s user interface by entering its IP address:
    • The default IP is usually 192.168.43.1.
    • Alternatively, you can use the hostname http://192.168.43.1:8080.
  • The Control Hub’s IP address is also displayed in the Robot Controller app on the Driver Station.

4. Connect to the Control Hub Wirelessly

  1. Use the ADB connect command to establish a wireless connection:
    adb connect <Control_Hub_IP>:5555
    Replace <Control_Hub_IP> with the actual IP address of your Control Hub, for example:
    adb connect 192.168.43.1:5555
  2. Verify the connection by checking connected devices again:
    adb devices
    The Control Hub should now appear as a device with its IP address.

5. Configure Android Studio

  • Open your FTC project in Android Studio.
  • Ensure the Control Hub is listed as a deployment target under Run > Select Deployment Target.
  • Select the Control Hub from the list.

6. Compile and Deploy Code

  • In Android Studio, click Build > Make Project to compile the code.
  • Click the green Run button to deploy the code to the Control Hub wirelessly.

7. Disconnect (Optional)

  • When done, disconnect ADB from the Control Hub:
    adb disconnect

Troubleshooting Tips

  • If ADB cannot connect, ensure your computer is connected to the Control Hub's Wi-Fi network.
  • If the Control Hub doesn’t appear as a deployment target, verify that it is listed in adb devices.
  • Restart the Control Hub and your computer if the wireless connection fails.

This setup allows for convenient wireless deployment of your code to the Rev Robotics Control Hub!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment