Skip to content

Implementation of the UsbBus trait of usb-device, which simulates a Bus as a USBIP Server. Useful for developing UsbClass traits and simulating devices.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

Sawchord/usbip-device

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Usb-Hid Driver

crates.io Documentation

This is an implementation of the UsbBus trait of usb-device, simulating a USB device as a USBIP server.

Note

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.

Usage

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.

Known Bugs

This is a very alpha software, which still has a lot of quirks to be worked out.

  • When using HID, the connection always fails the first time and usually works the second time. It is not entirely clear, why.

License

Apache-2.0 or MIT.

About

Implementation of the UsbBus trait of usb-device, which simulates a Bus as a USBIP Server. Useful for developing UsbClass traits and simulating devices.

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Languages