sudo apt-get install usbip
sudo apt-get install libusb-1.0-0-dev
sudo dnf install usbip
sudo dnf install libusb-devel
Usage: ./usbip_server.sh [options]
./usbip_client.sh [options]
Options:
Server:
-l, --list Lists usb devices on the server
-b, --bind device_id Binds usb device to server
-u, --unbind device_id Unbinds usb device
-n, --netstat Displays Netstat info
Client:
-l, --list server_ip Lists usb devices bound to the server
-a, --attatch server_ip device_id Attatches usb device specified
-d, --detach server_ip device_id Detaches usb device specified
In order to communicate with a usb device, you need to know its vendorID and productID. test_libusb.c outputs relevant information regarding all usb devices connected to your machine. To compile and execute test_libusb.c, run:
make
Alternatively, to see all usb devices connected to a linux machine, run:
lsusb
Each usb device has 1 or more endpoints (addresses specified by the printdevs() function in test_libusb.c). Picking the correct endpoint is done through trial and error, as far as we are aware... See below documentation on how to use the libusb_bulk_transfer function to send and receive raw data synchronously via usb.
NOTE: write error may occur if you have already written to the device. Try removing and re-inserting usb to fix. usbip is required; can be found in the package manager
http://www.dreamincode.net/forums/topic/148707-introduction-to-using-libusb-10/
https://wiki.openwrt.org/doc/howto/usb.iptunnel (DON'T FORGET THE SUDO's!!!)
https://github.com/texane/stlink
http://www.hertaville.com/stm32f0discovery-part-1-linux.html
(c) Sam & Shyan - Developed in Agile style