#usb #embedded #no-std #usbip

no-std usbip-device

An implementation of usb-device on top of USBIP device

7 releases

0.2.0 Nov 15, 2023
0.1.6 Nov 14, 2023
0.1.5 Aug 29, 2022
0.1.4 Mar 6, 2021
0.1.0 Jan 27, 2021

#1455 in Hardware support

Download history 124/week @ 2024-06-16 99/week @ 2024-06-23 71/week @ 2024-06-30 39/week @ 2024-07-07 39/week @ 2024-07-14 43/week @ 2024-07-21 202/week @ 2024-07-28 21/week @ 2024-08-04 63/week @ 2024-08-11 19/week @ 2024-08-18 24/week @ 2024-08-25 17/week @ 2024-09-01 21/week @ 2024-09-08 28/week @ 2024-09-15 51/week @ 2024-09-22 112/week @ 2024-09-29

215 downloads per month

Apache-2.0 OR MIT

49KB
1K SLoC

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.

Dependencies

~2MB
~35K SLoC