Hello, today I want to tell you how to put usbip on a server with an installed ubuntu 12.04 server.
USBIP (USB over IP) is used to send usb devices over the network, be it windows or linux client. The server part, alas, only under linux.
This solution is the best, free and in my opinion the only product that allows you to send almost any usb device.
1.
Install the USBIP server side .
I will skip the installation / configuration steps of the ubuntu 12.04 server.
1.1
First you need to upgrade your system .
sudo apt-get update && sudo apt-get dist-upgrade -y
1.2
Add a repository with usbip . The package is in the standard repository, but there it was not working.
sudo add-apt-repository ppa:whoopie79/ppa
1.3
Install the usbip package and enable the required modules. sudo apt-get install usbip -y modprobe usbip-core modprobe usbip-host
1.4
Add the required modules to autoload . To do this, open the / etc / modules file in the editor.
sudo nano /etc/modules
and add to the end
usbip-core usbip-host
1.5
Create an init.d script . To do this, copy /etc/init.d/skeleton
cp /etc/init.d/skeleton /etc/init.d/usbip
Next, edit the lines in /etc/init.d/usbip
DESC="usbip" NAME="usbipd" DAEMON_ARGS="-D"
After that, we give rights to the file
sudo chmod 755 /etc/init.d/usbipd
1.6 Add the init.d script to autoload.
sudo update-rc.d usbipd defaults
1.7 It's time to start usbip on the server, for this we run the command in the console
sudo /etc/init.d/usbipd start
If the team did not generate errors, then everything went well and you can proceed to usb device probros.
2.
Forwarding usb devices .
First you need to enable forwarding on the server itself. To do this, display a list of all usb devices connected to the server. We introduce:
usbip list -l
Must output something similar
root@ubuntu:~
where 1-2 device id, (8564: 1000) device ID.
In order to find out which usb devices you have connected, enter the command lsusb
root@ubuntu:~
I will forward the device with ID 8564: 1000 This is my usb flash drive. Next, enter the command:
root@ubuntu:~
If you saw the same answer as I mean everything went well.
Now let's allow on the firewall to connect to the usbip daemon which occupied TCP port 3240.
iptables -I INPUT -p tcp -m tcp --dport 3240 -j ACCEPT
You can connect to this device remotely.
')
3.
Connecting the device under Windows .
3.1
Installing the driver .
First you need to download the drivers and exe's
from this link.Unpack the archive into the c: \ usbip folder for convenience. Now you need to install a universal driver. This is done easily (I will describe the process only for win7 and win2k8r2):
Go to the
Device Manager , in the top menu, select
Action> Install Old DeviceEverywhere, press further until the dispatcher offers to
Install from disk ...Select this item, click the review and go to the folder c: \ usbip, there we select USBIPEnum.inf.
Install this driver. Moving on to the next item.
3.2 Connect the device.
In any favorite way, open cmd.exe
next we enter
cd c:\usbip usbip.exe -l <IP >
Should output something like this
- 192.168.1.8 1-2: unknown vendor : unknown product (8564:1000) : /sys/devices/pci0000:00/0000:00:06.0/usb1/1-2 : (Defined at Interface level) (00/00/00) : 0 - Mass Storage / SCSI / Bulk (Zip) (08/06/50)
Now let's proceed directly to the connection itself.
c:\usbip>usbip.exe -a <IP > 1-2
Must withdraw
c:\usbip>usbip.exe -a 192.168.1.8 1-2 new usb device attached to usbvbus port 1 Receive sequence: 14600
And then the connection of the new device should begin.
It is so easy to forward one usb device to another in about 30 minutes. Next time I will write how to forward a usb device from linux to linux. Thanks for reading my post. Leave your comments and suggestions in the comments.