Android Question UsbSerial & endpoint Type = 3

Pesciolina

Active Member
Licensed User
Longtime User
Hello,

I have to connect via Usb to a tool that exchanges data with type 3 endpoint.
Currently I connect using UsbSerial 2.5 and exchange setup data with type 2 endpoint.
Can I change the data type?

Thank you
 

Pesciolina

Active Member
Licensed User
Longtime User
with Agraham's UsbSerial library to connect I use the DRIVER_SILABS driver with which I can write,
but I don't receive anything because they arrive on USB_ENDPOINT_XFER_INT = 3

if the source were available I would create an ad hoc driver where I would modify this part of the code

Java:
UsbInterface localUsbInterface1 = this.mDevice.getInterface(this.mDevice.getInterfaceCount() - 1);
      for (int k = 0; k < localUsbInterface1.getEndpointCount(); k++) {
        UsbEndpoint localUsbEndpoint = localUsbInterface1.getEndpoint(k);
        if (localUsbEndpoint.getType() == 2) {
          if (localUsbEndpoint.getDirection() == 128)
            this.mReadEndpoint = localUsbEndpoint;
          else {
            this.mWriteEndpoint = localUsbEndpoint;
          }
        }
      }

thanks for your help
Marco
 
Upvote 0
Top