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

Support non-libusb/WinUSB devices on Windows #47

Open
brandonros opened this issue Jan 20, 2024 · 11 comments
Open

Support non-libusb/WinUSB devices on Windows #47

brandonros opened this issue Jan 20, 2024 · 11 comments

Comments

@brandonros
Copy link

Brandon@AsusRogStrix MINGW64 ~/Desktop/usbip (master)
$ cargo run --example host
    Finished dev [unoptimized + debuginfo] target(s) in 0.03s
     Running `target\debug\examples\host.exe`
[2024-01-20T20:41:55Z WARN  usbip] Impossible to share Bus 004 Device 000: ID 8086:7a60: Operation not supported or unimplemented on this platform, ignoring device
[2024-01-20T20:41:55Z WARN  usbip] Impossible to share Bus 004 Device 004: ID 8087:0033: Operation not supported or unimplemented on this platform, ignoring device
[2024-01-20T20:41:55Z WARN  usbip] Impossible to share Bus 001 Device 000: ID 1d6b:0004: Operation not supported or unimplemented on this platform, ignoring device
[2024-01-20T20:41:55Z WARN  usbip] Impossible to share Bus 004 Device 003: ID 322e:2122: Entity not found, ignoring device
[2024-01-20T20:41:55Z WARN  usbip] Impossible to share Bus 004 Device 021: ID 18e1:01b3: Entity not found, ignoring device
[2024-01-20T20:41:55Z WARN  usbip] Impossible to share Bus 002 Device 000: ID 8086:1135: Operation not supported or unimplemented on this platform, ignoring device
[2024-01-20T20:41:55Z WARN  usbip] Impossible to share Bus 003 Device 000: ID 1d6b:0000: Operation not supported or unimplemented on this platform, ignoring device

Trying to see what the issue is, opening this issue to put my notes

@brandonros
Copy link
Author

image

@brandonros
Copy link
Author

brandonros commented Jan 20, 2024

image

image

Why would it say Entity not found... hmm... let me add some logs

@brandonros
Copy link
Author

brandonros commented Jan 20, 2024

I got it, this only supports libusb devices, not devices with like actual drivers...? I'd have to uninstall my driver for this device and replace it with WinUSB, the rusb::open() call is failing which is basically libusb_open

No idea if this is even possible

@brandonros brandonros changed the title Debugging Entity not found, ignoring device Support non-WinUSB devices on Windows Jan 20, 2024
@brandonros brandonros reopened this Jan 20, 2024
@brandonros brandonros changed the title Support non-WinUSB devices on Windows Support non-libusb/WinUSB devices on Windows Jan 20, 2024
@beriberikix
Copy link

Does #54 help?

@brandonros
Copy link
Author

I'm down to try it but I have a question. Is it a bad idea to try and proxy from Windows to Android?

Basically virtual USB, cross-platform

@beriberikix
Copy link

Not sure what you mean - a windows device as a USB server and Android as the client? That seems reasonable.

@brandonros
Copy link
Author

What about reverse?

USB device connected to an Android tablet (server), Windows trying to communicate with the device remotely (client)

You and I would expect that to not work, right? Or should I try it and report back?

@beriberikix
Copy link

That should work in theory, but you would need a USBIP Server on Android and a client on Windows. I haven't tested these but something like this Android app and this client might work.

@brandonros
Copy link
Author

I wrote the Rust + JNI wrapper to run this as the USBIP Server, the problem is

Android wants to speak libusb

Windows wanted to speak not-libusb

That'll never be compatiable, right?

How can the kernel Windows USB driver (even if it boils down to simple libusb-like commands, reading/writing/transferring/ioctling from endpoints, etc.), are they compatible without a conversion layer?

@beriberikix
Copy link

The conversion layer is the USB/IP Protocol. It shouldn't matter how the client and server are implemented, as long as they implement the same spec. The usbip-win2 uses all native Windows APIs and networking stack, but that shouldn't matter.

@brandonros
Copy link
Author

vadimgrn/usbip-win2#55 (comment)

Some strangeness on this

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

2 participants