Welcome! Log In Create A New Profile

Advanced

Usb over IP on debian squeeze

Posted by a5m0 
Usb over IP on debian squeeze
February 25, 2011 10:49PM
Hello everyone, I've got a problem that I would greatly appreciate some help with, and I'm sure there are other people that would love to have this information too. I would like to get USBip working on my dockstar.

Originally I had installed openwrt on the nand on my dockstar, (because this guy apparently had great success http://opossum.posterous.com/dockstar-dramatis-per-sonare-or-the-neo-50-di-0 ) however I could not seem to find an imagebuilder for the outdated openwrt that he used and he gives very few instructions, and when I built the newest trunk snapshot, it did not have kmod-usb2 for highspeed, and I couldn't get usbip working either, though the ipkg installed fine.

So I put debian squeeze on my dockstar very easily with the doozan install .sh, but now I'm again having trouble getting usbip to run. It installs fine with apt-get install usbip, but modprobe usbip returns "FATAL: Module usbip not found."

I even tried following these directions ( http://www.howtoforge.com/how-to-set-up-a-usb-over-ip-server-and-client-with-debian-lenny ) to build it myself, but the build always fails. Also, if I try to do insmod usbip_common_mod.ko I just get "insmod: can't read 'usbip_common_mod.ko': No such file or directory"

It /appears/ to me that the main issue is that the modules aren't being loaded even though I'd tried adding them to /etc/modules I still receive this message

root@debian:~# usbipd -D
usbip err: stub_driver.c:  33 (open_sysfs_stub_driver) usbip_common_mod.ko and usbip.ko must be loaded

** ERROR **: driver open failed
aborting...


help would be greatly appreciated!

it also seems that this could be relevant, but I don't understand what he did or if it's actually the same issue ( http://sourceforge.net/projects/usbip/forums/forum/418507/topic/3410784?message=7651180 ) and his reply to himself ( http://sourceforge.net/projects/usbip/forums/forum/418507/topic/3410784?message=7675072 )
Re: Usb over IP on debian squeeze
February 26, 2011 02:33AM
I found that there is a debian patch tracker page for this, but I can't really tell if these patches are included, there is a comment in one of the files that says something about being unreleased, but the patch is old and some of the files i compared looked the same, verdict is still out.

http://patch-tracker.debian.org/package/usbip
opossum
Re: Usb over IP on debian squeeze
April 05, 2011 01:25AM
Hello!

What went wrong while using OpenWRT?
I never used any image builder, only files already build for the kirkwood/dockstar board by the O-WRT dev.
The release that I use is not that much outdated.
Anyway, I hope you since found what you were looking for. If anybody tried the open-wrt way and fail, I'll gladly help as much as I can.
Re: Usb over IP on debian squeeze
April 08, 2011 07:40PM
Hi, opossum
I tried the trunk version once to install in the internal flash of Dockstar and it works fine. However, I don't have much success of using it for install in USB. The problem is the uImage file. If I use the uImage that I built together with the rootfs.tar.gz, openwrt will work. However, if I use the uImage downloaded from the trunk, it never works. It appears booting but there's no ip can be seen. Have you ever tried the trunk built version on USB?
opossum
Re: Usb over IP on debian squeeze
April 10, 2011 12:37AM
Well, I never tried booting from USB since OpenWRT has quite a small footprint, but I guess it could be quite handy for multi-distro booting.
If your custom built works and not the trunk version, there are some USB or network features that are not enable by default in the trunk that you may have built in your kernel.

"It appears booting but there's no ip can be seen". Have you got serial access? If so, what's the output? And from what/where are you screening for an IP.
The DHCP server on the Trunk might not be on.

I'll be able to check in a couple of days, what is your uboot print?
Decap_dk
Re: Usb over IP on debian squeeze
April 29, 2011 04:03AM
I have been working on a solution to this for some time now - without luck. I am having issues compiling the drivers (usbip,ko, usbip_common_mod.ko etc.) but keep getting errors. I have tried compiling from source without luck (maybe need to inc patch) and compiling the staging drivers from linux source 2.6.32 but no luck

If an of you are able to compile the driver (*.ko) files for debian squeezebox (linux kernel 2.6.32-5-kirkwood) and post them for us to try that would be great!
opossum
Re: Usb over IP on debian squeeze
April 29, 2011 11:53AM
Hi Decap_dk
What type of error do you get when compiling/using the staging driver?
Jean
Re: Usb over IP on debian squeeze
May 10, 2011 08:09AM
Decap_dk Wrote:
-------------------------------------------------------
> If an of you are able to compile the driver (*.ko)
> files for debian squeezebox (linux kernel
> 2.6.32-5-kirkwood) and post them for us to try
> that would be great!

Hi all,

Same issue here, when trying to compile the drivers on the same kernel. It looks like that we shouldn't use the compiled version on this kernel, but the "staging version". I'm unable to understand how to install such a kernel staging module ... Any help would be greatly appreciated ...

Thanks in advance;
Jean
Re: Usb over IP on debian squeeze
May 30, 2011 12:56PM
Jean Wrote:
-------------------------------------------------------
>
> Hi all,
>
> Same issue here, when trying to compile the
> drivers on the same kernel. It looks like that we
> shouldn't use the compiled version on this kernel,
> but the "staging version". I'm unable to
> understand how to install such a kernel staging
> module ... Any help would be greatly appreciated
> ...
>
> Thanks in advance;
> Jean

I'm also looking to get this working. Spent a few hours reading around the topic.

The "staging version" means it should already be part of the kernel and therefore does not need anything doing. BUT a comparison of "/lib/modules/2.6.32-5-686/kernel/drivers/staging" on an x86 machine and "/lib/modules/2.6.32-5-kirkwood/kernel/drivers/staging" on the Dockstar shows that a "usbip" directory containing usbip_common_mod.ko, usbip.ko and vhci-hcd.ko is missing (along with several other irrelevant directories). So, as Decap-dk suggested, these need compiling since they are not already present.

Looking for idiot guide to doing this!

Ian
Re: Usb over IP on debian squeeze
June 05, 2011 03:06PM
So, I got this to work.

First I was following the tutorial from a5m0's post http://www.howtoforge.com/how-to-set-up-a-usb-over-ip-server-and-client-with-debian-lenny. As I was installing on squeeze, I skipped the part about adding the squeeze repositories.

The squeeze repository contains the usbip and source package, but you need to build the kernel module.

Doing that led to a compile error:

/tmp/usbip/usr_src/modules/usbip/src/stub_dev.c: In function 'stub_probe':
 /tmp/usbip/usr_src/modules/usbip/src/stub_dev.c:392: error: 'struct device' has no member named 'bus_id'

Searching for that error I found a comment on the Ubuntu bug tracker which has a source patch that fixes the build error. Apparently some of the structures changed in the new kernel headers. You can download the src from here

https://bugs.launchpad.net/ubuntu/+source/usbip/+bug/508762

and then just continue to follow the tutorial, compile the kernel modules, install them and run usbip.

Thought it might help someone else.



Edited 1 time(s). Last edit at 06/05/2011 03:07PM by illumination.
Re: Usb over IP on debian squeeze
June 05, 2011 11:48PM
Thank you! I've been toying with this off and on for months now!
Re: Usb over IP on debian squeeze
June 06, 2011 06:44PM
Thank you illumination.

I followed the instructions in the original link explicitly and the build stopped. But after downloading the file from the 2010-10-04 post mentioned in your second link, moving it to /usr/src/ to replace the existing usbip.tar.bz2 file, and trying again the build and compile complete. The modprobe commands seem to work ok with correct output for lsmod . I seem to now have usbip 0.2.0 installed.

Problem now is if I try to start the usbip daemon with usbipd -D, i get the following error: "usbip err: stub_driver.c: 34 (open_sysfs_stub_driver) usbip-core.ko and usbip-host.ko must be loaded"

Anyone got further than this?

Ian
Re: Usb over IP on debian squeeze
June 09, 2011 12:44AM
I extracted the bz2 so I had a /usr/src/modules/usbip directory and then proceeded with the m-a building commands from the original instructions. usbipd -D runs without any errors.
Re: Usb over IP on debian squeeze
June 09, 2011 01:51PM
rcaron Wrote:
-------------------------------------------------------
> I extracted the bz2 so I had a
> /usr/src/modules/usbip directory and then
> proceeded with the m-a building commands from the
> original instructions. usbipd -D runs without any
> errors.

Does USBIP work then?
Re: Usb over IP on debian squeeze
June 09, 2011 01:56PM
illumination Wrote:
-------------------------------------------------------
> So, I got this to work.
>
> First I was following the tutorial from a5m0's
> post
> http://www.howtoforge.com/how-to-set-up-a-usb-over
> -ip-server-and-client-with-debian-lenny. As I was
> installing on squeeze, I skipped the part about
> adding the squeeze repositories.
>
> The squeeze repository contains the usbip and
> source package, but you need to build the kernel
> module.
>
> Doing that led to a compile error:
>
>
> /tmp/usbip/usr_src/modules/usbip/src/stub_dev.c:
> In function 'stub_probe':
> /tmp/usbip/usr_src/modules/usbip/src/stub_dev.c:3
> 92: error: 'struct device' has no member named
> 'bus_id'
>
>
> Searching for that error I found a comment on the
> Ubuntu bug tracker which has a source patch that
> fixes the build error. Apparently some of the
> structures changed in the new kernel headers. You
> can download the src from here
>
> https://bugs.launchpad.net/ubuntu/+source/usbip/+b
> ug/508762
>
> and then just continue to follow the tutorial,
> compile the kernel modules, install them and run
> usbip.
>
> Thought it might help someone else.
Hi, illumination :
Just want to make sure that you have a working usbip eventually. I am really interested in this but discouraged by all the failures (me and others).
Re: Usb over IP on debian squeeze
June 10, 2011 12:43AM
Honestly not yet. I have the client on an xp machine and can connect to my test flash drive, but whenever I try to copy a file in either direction explorer crashes. Granted, this is over a wireless connection but I haven't tried otherwise yet.

However, this is consistent with my experience trying to run usbipd on the latest ubuntu release so perhaps I'm doing something wrong client side...
Re: Usb over IP on debian squeeze
June 11, 2011 02:23PM
So, following the instructions I posted, I have USBIP running on my pogoplug pink using debain squeeze and sharing my Samsung multi function printer with a Windows 7 client. All working fine. I can print and scan. I haven't tried to share anything else though.
Re: Usb over IP on debian squeeze
June 12, 2011 12:45AM
illumination Wrote:
-------------------------------------------------------
> So, following the instructions I posted, I have
> USBIP running on my pogoplug pink using debain
> squeeze and sharing my Samsung multi function
> printer with a Windows 7 client. All working fine.
> I can print and scan. I haven't tried to share
> anything else though.
Hi, illumination:
Encouraged by you success, I installed usbip on my Dockstar/Squeeze. Everything looked fine on the server side. I then installed the windows 7's client from here: http://sourceforge.net/projects/usbip/files/usbip_windows/usbip_windows_v0.2.0.0_signed.zip/download. Everything looks fine as well . The USB devices on the server looked fine when I use the usbip -l 192.168.1.xx commend. However, when I execute usbip -a 192.168.1.xx 1-1.4 (1-1.4 is the port of Canon MP600 that I want use) it shows:

new usb device attached to usbvbus port 1

usbip err: usbip_windows.c: 374 (write_to_dev) read from sock ret 0 not equal a usbip_header

I cannot use the printer either. Do you have any idea how I can fix this?
Re: Usb over IP on debian squeeze
June 13, 2011 10:00AM
Sorry for my delayed replies, I have been battling to get my usb wifi dongle working, so I haven't really been paying attention to anything else.

back to this, twinclouds, it seems I am using the 0.1.0.0 usbip client on my Windows 7 box. When I did this the 0.2.0.0 version wasn't available for download as it seems this was only posted on 10 June. Perhaps it is some sort of versioning conflict?

I'll try the 0.2.0.0 version when I get a little time (possibly tomorrow) and report back.
Re: Usb over IP on debian squeeze
June 14, 2011 01:19AM
I tried 0.1.0.0. The command screen first showed "new usb device attached to usbvbus port 1" and hung there. At that time, I can connect to the MFP with both scan and print functions. Then, three usbip error lines:
"usbip error: usbip_vbus_vi.c 390 (write_to_device) last error:87
usbip error: usbip_vbus_vi.c 391 (write_to_device) out: 0 ret:0 len:64
usbip error: usbip_vbus_vi.c 392 (write_to_device) write dev failed"
appeared and the connection interrupted.
It appears that this is known problem, i.e., the connection get reset on its own for some composite devices.
Re: Usb over IP on debian squeeze
June 17, 2011 01:09PM
Nothing new - just an update from my post on June 06 to confirm that I got usbip to compile ok and usbipd -D to give the correct response. Illumination's instructions worked fine once I reinstalled Debian to clear all the rubbish I had installed previously to try to get this to work. Only downside is that meanwhile I bought a specific printer server to get my wife's Canon IP4500 to work (too much pressure!).
Re: Usb over IP on debian squeeze
June 17, 2011 03:58PM
I installed usbip dockstar with openwrt. The results are the same: 2.0 give me error right away and 1.0 works for a while while the windows 7 command window hung there, but then disconnected. I might need to try another printer (non-multi-fucntion) to see if it works better.
One question I have is what supposed to be the windows behavior. After I do usbip -a ... command, should it return to the normal prompt right away and not hang there? In addition, once I installed the device driver, will it keeps there after reboot?
Jean
Re: Usb over IP on debian squeeze
July 20, 2011 02:53PM
Guys,

I'm following this thread since some weeks now. I'm surprised that none found a working package of the kernel modules of the usbip tools. Why do we have separate packages for the kernel modules and the user-land binaries made by the Debian packager team ? I have some of my friends having the same issue with usbip, and we find that something really stupid (the Ubuntu distro packagers maintains one package only containing both the kernel AND the user-land tools ...).

Anyway, i will have some time during the next days, and hope to find some time to compile the kernel modules. Once compiled, i will if possible upload the modules to share them. Can someone of you maybe explain how to make a real package, which looks to me a better way to share some binaries ...

Cheers :-)
Jean
Re: Usb over IP on debian squeeze
July 27, 2011 04:14PM
Guys,

I confirm that the post written by Illumination above is excellent : the module has been properly compiled and is working well, thanks a lot :-)

Any help on how to build a modules package will be welcome to help to share the modules !

Cheers,
Jean
Re: Usb over IP on debian squeeze
August 01, 2011 01:46PM
Hi,

i saw this post and thought it is a good idea to use the dockstar as usb device server but i ran into some problems.
I installed the usbip package from debian repository and all went fine. The problem begin after i connected the shared device with the windows client 0.2.0.0 to my windows 7 x64 desktop computer and tried to disconnect the device from the windows 7 client. After disconnect i wasn't able to reconnect the device to the computer. I thought it was a problem with the client and tried another windows 7 client, my notebook.
On my notebook it was the same problem, no connect to the shared device.
I logged into the shell on seagate dockatsr debian squeeze an checked if the device driver on the server is correctly binded to usbip and there was the problem.

usbip_bind_driver --list

tells the following:


List USB devices
 - busid 1-1 (05e3:0608)
         1-1:1.0 -> hub

 - busid 1-1.2 (0951:1649)
         1-1.2:1.0 -> usb-storage

 - busid 1-1.3 (04b8:0005)
         1-1.3:1.0 -> usblp

 - busid 1-1.4 (1bcf:0c31)
         1-1.4:1.0 -> usb-storage

root@dockstar:~#

The red marked entry is the device i want to share. So after disconnect via windows client the driver was unbinded so i have to rebind it again.
Did you all have the same problem???

Is there any workaround or a fix???

Thanks

StefanV3
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: