To wirelessly connect to a Rev Robotics Control Hub and compile/deploy code from Android Studio using ADB (Android Debug Bridge), follow these steps:
- Ensure Android Studio is installed and configured on your computer.
- Make sure your FTC Robot Controller app is set up on the Control Hub.
- Install ADB on your computer (if not already included with Android Studio).
- 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”
, whereXXXX
is a unique identifier. - The default password is
“password”
, unless it has been changed.
- The network name (SSID) is usually in the format
- Connect the Control Hub to your computer using a USB cable.
- Open a terminal or command prompt and check the device connection:
Ensure the Control Hub appears in the list of connected devices.
adb devices
- Enable TCP/IP mode for ADB on the Control Hub:
This command restarts ADB in TCP/IP mode, allowing wireless debugging.
adb tcpip 5555
- 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 default IP is usually
- The Control Hub’s IP address is also displayed in the Robot Controller app on the Driver Station.
- Use the ADB connect command to establish a wireless connection:
Replace
adb connect <Control_Hub_IP>:5555
<Control_Hub_IP>
with the actual IP address of your Control Hub, for example:adb connect 192.168.43.1:5555
- Verify the connection by checking connected devices again:
The Control Hub should now appear as a device with its IP address.
adb devices
- 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.
- 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.
- When done, disconnect ADB from the Control Hub:
adb disconnect
- 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!