I have a Uno R3 "look alike" which works entirely as expected with a computer but a Galaxy Nexus program can only detect one endpoint, an interrupt, with no bulk endpoints. The same program, with a thumb drive, will detect all three expected endpoints. Does this Uno have wrong firmware in the usb-serial adapter? The examples from Nexus-Computing GmbH Switzerland clearly use bulk endpoints.
private void processEndPoint(int endPointCount, UsbInterface usbInterface) {
UsbEndpoint epOut = null;
UsbEndpoint epIn = null;
UsbEndpoint epInt = null;
for (int i=0; i<endPointCount; i++) {
UsbEndpoint ep = usbInterface.getEndpoint(i);
if (ep.describeContents() > 0) {
sb.append("ep " + i + " Contents " + String.valueOf(ep.describeContents()) + ":");
}
sb.append("ep " + i + " EndpointNumber " + String.valueOf(ep.getEndpointNumber()) + ":");
sb.append("ep " + i + " Attributes " + String.valueOf(ep.getAttributes()) + ":");
sb.append("ep " + i + " Direction " + String.valueOf(ep.getDirection()) + ":"); // 0x80 = in, 0 = out
sb.append("ep " + i + " MaxPacketSize " + String.valueOf(ep.getMaxPacketSize()) + ":");
sb.append("ep " + i + " Type " + String.valueOf(ep.getType()) + ":");
if (ep.getType() == UsbConstants.USB_ENDPOINT_XFER_BULK) {
if (ep.getDirection() == UsbConstants.USB_DIR_OUT) {
epOut = ep;
sb.append("found ep out :");
} else {
epIn = ep;
sb.append("found ep in :");
}
} else if (ep.getType() == UsbConstants.USB_ENDPOINT_XFER_INT) {
epInt = ep;
sb.append("found ep interrupt :");
} else {
sb.append("found ep unknown :");
}
}
I couldn't figure out how to add the screen shot!