diff --git a/androidgcs/src/org/openpilot/androidgcs/telemetry/HidUAVTalk.java b/androidgcs/src/org/openpilot/androidgcs/telemetry/HidUAVTalk.java index ae406121d..59380fbf0 100644 --- a/androidgcs/src/org/openpilot/androidgcs/telemetry/HidUAVTalk.java +++ b/androidgcs/src/org/openpilot/androidgcs/telemetry/HidUAVTalk.java @@ -257,6 +257,12 @@ public class HidUAVTalk extends TelemetryTask { UsbEndpoint ep1 = null; UsbEndpoint ep2 = null; + if (connectDevice.getInterfaceCount() < 2) { + if (ERROR) Log.e(TAG, "Interface count for USB device incorrect"); + telemService.toastMessage("Failed to connect"); + return false; + } + // Using the same interface for reading and writing usbInterface = connectDevice.getInterface(0x2); if (usbInterface.getEndpointCount() == 2)