USB interface in android

前端 未结 5 1875
天命终不由人
天命终不由人 2021-02-06 10:02

I rooted my device and working in host mode. I can able to detect the usb device connected to my tab but Am having two questions.

1) i try to display my device name usi

5条回答
  •  庸人自扰
    2021-02-06 10:47

    Code above works fine for most of the devices except Samsung mobile devices. For making them supply Language ID else you will get stall.

    int rdo = connection.controlTransfer(UsbConstants.USB_DIR_IN
    | UsbConstants.USB_TYPE_STANDARD, STD_USB_REQUEST_GET_DESCRIPTOR,
    (LIBUSB_DT_STRING << 8) | idxMan, 0x0409, buffer, 0xFF, 0);
    

提交回复
热议问题