Crates.io | usbip-device |
lib.rs | usbip-device |
version | 0.2.0 |
source | src |
created_at | 2021-01-27 10:09:31.528062 |
updated_at | 2023-11-15 15:47:58.415896 |
description | An implementation of usb-device on top of USBIP device. |
homepage | |
repository | https://github.com/Sawchord/usbip-device |
max_upload_size | |
id | 347218 |
size | 75,183 |
This is an implementation of the UsbBus
trait of usb-device
, simulating a USB device as a USBIP server.
This crate is not intended to be used in production ever.
It's purpose is to ease development of new UsbClass
implementation or to emulate USB devices for easier embedded application development.
The usbip client can be stared in the following way:
sudo apt-get install linux-tools-generic
Then, start the application.
cargo run --example serial_echo
and then start the USBIP client.
// Start the vhci driver
sudo modprobe vhci-hcd
// List available devices
usbip list -r "localhost"
// Attach USB device
usbip attach -r "localhost" -b "1-1"
// List connected devices
usbip port
// Detach device
usbip detach -p "port"
Depending on you machine setup, you might need do sudo
.
This is a very alpha software, which still has a lot of quirks to be worked out.
Apache-2.0 or MIT.