Install USBIP. Update HowTo

Hi there,
For few days I try to install and run USBIP in my router as server and my Lead 15.1 as client.
Router seems to be OK but I can’t get the client working.
I found an old HowTo but for Opensuse 11.2. Could someone help me to update it and let help me to install in my box?

Right now I am stuck on how to load automatically the modules and what the difference between usbip_core and usbip_common_mod

For more info, you can see what I did so far in the OpenWRT forum here

Thank you for your help

I would start by ensuring that you don’t have a version mismatch between server and client

usbip version

FWIW, I note openSUSE packages for usbip are here
https://software.opensuse.org/package/usbip

I don’t have time to trawl through your OpenWRT thread, but did you make sure that the vhci_hcd driver was loaded first? Do that manually

sudo modprobe vhci_hcd

then try

usbip list -r 192.168.1.1

Attach the device eg device with busid 1-1…

sudo usbip attach -r 192.168.1.1 -b 1-1

Reference:
https://wiki.archlinux.org/index.php/USB/IP#Client_setup

Client side

~> sudo usbip version
usbip (usbip-utils 2.0)

~> sudo modprobe vhci_hcd
~>

~> lsmod | grep vhci_hcd
vhci_hcd               45056  0
usbip_core             32768  1 vhci_hcd
usbcore               290816  10 usbhid,snd_usb_audio,vhci_hcd,ehci_hcd,ohci_pci,xhci_pci,snd_usbmidi_lib,ohci_hcd,xhci_hcd,ehci_pci

~> sudo usbip list -r 192.168.1.1
[sudo] password for root: 
Exportable USB devices
======================
 - 192.168.1.1
        1-1: Brother Industries, Ltd : DCP-7055 scanner/printer (04f9:0248)
           : /sys/devices/platform/soc/soc:internal-regs/f1058000.usb/usb1/1-1
           : (Defined at Interface level) (00/00/00)

~> sudo usbip attach -r 192.168.1.1 -b 1-1
[sudo] password for root: 
libusbip: error: udev_device_new_from_subsystem_sysname failed
usbip: error: open vhci_driver


This is what I did and commented previousely in the other thread in OpenWRT.
I am stuck here
Thank you for your help

Ok, but you still haven’t answered the question with respect to the server version.

~> sudo usbip list -r 192.168.1.1
[sudo] password for root: 
Exportable USB devices
======================
 - 192.168.1.1
        1-1: Brother Industries, Ltd : DCP-7055 scanner/printer (04f9:0248)
           : /sys/devices/platform/soc/soc:internal-regs/f1058000.usb/usb1/1-1
           : (Defined at Interface level) (00/00/00)

That looks as expected at least.

~> sudo usbip attach -r 192.168.1.1 -b 1-1
[sudo] password for root: 
libusbip: error: udev_device_new_from_subsystem_sysname failed
usbip: error: open vhci_driver

I’m still not sure about whether this is due to version mismatch with server though.

Try using the newer version package listed (‘Show experimental packages’) in the link I gave to you already.

Sorry I forgot

Server

~# usbip version
usbip (usbip-utils 2.0)

However, after reboot my PC (client) I get

~> sudo usbip list -r 192.168.1.1
[sudo] password for root: 
usbip: info: no exportable devices found on 192.168.1.1

~> lsmod | grep vhci_hcd
~> 

~> sudo modprobe vhci_hcd
~> lsmod | grep vhci_hcd
vhci_hcd               45056  0
usbip_core             32768  1 vhci_hcd
usbcore               290816  10 usbhid,snd_usb_audio,vhci_hcd,ehci_hcd,ohci_pci,xhci_pci,snd_usbmidi_lib,ohci_hcd,xhci_hcd,ehci_pci

~> sudo usbip list -r 192.168.1.1
usbip: info: no exportable devices found on 192.168.1.1

I’d guess I need to setup a permanent ~> sudo modprobe vhci_hcd
How?

Server side

~# usbip list -l
 - busid 1-1 (04f9:0248)
   Brother Industries, Ltd : DCP-7055 scanner/printer (04f9:0248)

~# usbip --debug attach -r 192.168.1.1 -b 1-1
usbip: debug: usbip.c:141:[run_command] running command: `attach'
usbip: debug: usbip_network.c:207:[usbip_net_recv_op_common] request failed at peer: 1
usbip: error: recv op_common
usbip: error: query

~# usbip bind -b 1-1
usbip: info: bind device on busid 1-1: complete

Client side

~> sudo usbip list -r 192.168.1.1
Exportable USB devices
======================
 - 192.168.1.1
        1-1: Brother Industries, Ltd : DCP-7055 scanner/printer (04f9:0248)
           : /sys/devices/platform/soc/soc:internal-regs/f1058000.usb/usb1/1-1
           : (Defined at Interface level) (00/00/00)

~> sudo usbip attach -r 192.168.1.1 -b 1-1
libusbip: error: udev_device_new_from_subsystem_sysname failed
usbip: error: open vhci_driver

Same server side: I need to setup a permanent config. How? (If you don’t know about Openwrt, I’ll ask on there forum).

I installed the version from devel:tools 4.12.14

~> sudo usbip version
[sudo] password for root: 
usbip (usbip-utils 2.0)

~> sudo usbip attach -r 192.168.1.1 -b 1-1
~>

~> sudo usbip list -r 192.168.1.1
Exportable USB devices
======================
 - 192.168.1.1
        1-1: Brother Industries, Ltd : DCP-7055 scanner/printer (04f9:0248)
           : /sys/devices/platform/soc/soc:internal-regs/f1058000.usb/usb1/1-1
           : (Defined at Interface level) (00/00/00)

~> sudo usbip attach -r 192.168.1.1 -b 1-1
usbip: error: recv op_common
usbip: error: query


First time sudo usbip attach returns nothing, second time returns error. Is it due to the fact it is already attached?
After that I tried Xsane scanner tool. This prog is working when the scanner is directly connected. Now it returns error “Failed to open device”
Is there somthing to change in the PC config?

Just wandering. I installed the package devel:tools 4.12.14 but I see the usbip version is 2.0 (same as previous). Is it right? Did I made a mistake?

Yes, I would have thought that since the server version is old, the original client version should also be ok. Is it possible to update the server end?

Server side
Router Linksys WRT32X AC3200, OpenWrt 19.07.3
Last version is usbip 2.0-11. As there is a bug in libudev-fbsd from 18.06, I had to uninstall libudev-fbsd and install libudev from OpenWrt 17.01.7.
This work fine for other users.

Not sure what else I can advise here, except maybe to submit a bug report…
https://sourceforge.net/projects/usbip/support

Perhaps you could try testing behaviour with two openSUSE hosts (server and client) as well.

Here is another usbip thread that may be of interest…
https://forums.opensuse.org/showthread.php/537620-usbip-not-working-anymore-for-storage-device

Looking back during a search, I see you had no success with this during a previous attempt…
https://forums.opensuse.org/showthread.php/530073-USBIP-looks-messy

This was in 2018 for my first try to connect my printer/scanner.I didn’t succeed and gave up.

Now what about this usbip version 4.12 hereShould I try? What link and how to install it?

Up to you. No promises.

What link and how to install it?

Use the page I linked to back in post #2. Under the experimental packages there is. Use the expert download option and choose and openSUSE binary to download/install.

Sorry, I am not an English native, I don’t understand your second sentence moreover not an expert in Linux.
Show Experimental packages, 2 choices

  • devel:tools 4.12.14
  • network 2.0
    Which one?
    Then Expert Download
    Then OpenSuse
    Then ??? Could you let me know the right link

Thank you for your patience.

Here you go…
https://download.opensuse.org/repositories/devel:/tools/openSUSE_Leap_15.1/x86_64/usbip-4.12.14-9.d_t.4.x86_64.rpm

  • I have no idea whether it will help though.

Installed this version;
Server side

~# usbip version
usbip (usbip-utils 2.0)
~# usbip bind -b 1-1
usbip: error: device on busid 1-1 is already bound to usbip-host


Client side

~> sudo usbip version
[sudo] password for root: 
usbip (usbip-utils 2.0)
~> sudo modprobe vhci_hcd
~> sudo usbip list -r 192.168.1.1
Exportable USB devices
======================
 - 192.168.1.1
        1-1: Brother Industries, Ltd : DCP-7055 scanner/printer (04f9:0248)
           : /sys/devices/platform/soc/soc:internal-regs/f1058000.usb/usb1/1-1
           : (Defined at Interface level) (00/00/00)

~> sudo usbip attach -r 192.168.1.1 -b 1-1
~> sudo usbip attach -r 192.168.1.1 -b 1-1
usbip: error: recv op_common
usbip: error: query

I see that the first time I rum usbip attach, there is no answer but the second time error message.
Is it a usual behaviour? Maybe the device is correctly attached the first time?
When I start the XSane scanner tool (working when scanner is directly connected to the PC), I got the error message

Failed to open device 'brother4:net1:dev0': Invalid argument

Is there another step between usbip attach and run the application?
I can’t see any GUI setup. Is there a config file to set, in .sane 3 files: BrotherCP-7055.drc, xsane.mdf, xsane.rc but instide, I can’t see any setting related to the link to the device.