Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bulkInTransfer returns "libusb_bulk_transfer returned -7, Operation timed out" on Android 13 #428

Open
GrieVeR-13 opened this issue Jan 30, 2025 · 0 comments

Comments

@GrieVeR-13
Copy link

GrieVeR-13 commented Jan 30, 2025

Hello Magnusja.

When trying to send any command (SCSI Inquiry, SCSI read capacity (10), etc.) to interact with the SSD via the adapter on android 13, the libusb_bulk_transfer function returns the error code LIBUSB_ERROR_TIMEOUT.

At the same time, on android 9 and windows 10, the same SSD with the same adapter works right.

A regular flash drive (8gb) on android 13 works.
Increasing the timeout does not solve the problem.

The same timeout related error also occurs with default USB communication value ​​(UnderlyingUsbCommunication.DEVICE_CONNECTION_SYNC mode)

bulkOutTransfer writes to outEndpoint successfully.

The problem is also reproduced in other applications using libusb (tested on android app: ZUGate).

The problem is reproduced on the following configuration:
OS: Android 13 MIUI 14.0.7
SSD: 870 PRO Samsung 4 TB
External SSD Enclosures: DEXP 2518s3 with controller ASMT105x

Scenario:
//Request LUN
controlTransfer(161, 254, 0, index, buffer, length, TRANSFER_TIMEOUT)
//Successfully

//Sending a command SCSI Inquiry (bulk OUT transfer).
bulkOutTransfer (outEndpoint.address, src.array(), src.position(), src.remaining(), TRANSFER_TIMEOUT)
//Successfully.

//Reading the response from the command (bulk IN transfer).
bulkInTransfer (libUsbHandle, inEndpoint.address, dest.array(), dest.position(), dest.remaining(), TRANSFER_TIMEOUT)
//! returns Exception with message "libusb_bulk_transfer returned -7, Operation timed out"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant