forenbenutzer
Posts: 148
Joined: Thu Aug 02, 2012 7:08 pm

Re: USB redirector

Sat Oct 13, 2012 12:03 am

DungBeetle wrote:Having followed the instructions above I now have my Pi sharing both a Philips camera and a USB RS-232 port. I also have a working install of the windows client. Unfortunately, the client will not connect to the host and running usbipd --debug on the Pi gives a message of 'version mismatch: 262 273'.
A google search for this error provides a post which refers to an OpenWrt patch file but I am unsure as to whether or not this is applicable here. Downloading the patch file and attempting to patch with it results in a message to the effect that it cannot find the file to be patched. Having expended my meagre knowledge of linux I'd like to ask if anyone has any pointers. I have tried both versions of the windows client. Windows OS is 7 Ultimate 64 bit.

Many thanks,
I recompiled the usbip.exe with changed version string (usbip.zip) and uploaded it here: http://edv-huber.com/images/downloads/usbip/usbip.zip

Protip: Apply your usbip Windows experiments in a virtual machine to avoid random blue screens in your (productive) environment. :evil:
Pitendo - Case And Emulator Project - http://edv-huber.com/index.php/problemloesungen/12-pitendo

Wm.A.Weezl
Posts: 12
Joined: Thu Oct 18, 2012 1:54 am

Re: USB redirector

Tue Oct 23, 2012 1:26 am

Hi. I am trying to get usbip working with the RasPi as server and a Debian Squeeze (one generation earlier than Wheezy) computer as client. I started out with a method found on Sourceforge[1], but that didn't work out.

Then I found this page and used secretagent's method of July 12, but first installed a swapfile as explained in cubii's July 20 post. The usbip setup proceeded without errors, and usbip list -l gives a result that looks OK. When I issued sudo usbip bind --busid 1-1.2, usbip returned bind device on busid 1-1.2: complete. However, I think there's still a problem, because ...
Pi >sudo usbip --debug
usbipd: info: starting usbipd (usbip-utils 1.1.1)
usbipd: error: failed to open a listening socket


On the client, it wasn't going well until I forced it to install the 1.1.1 version of usbip from Wheezy, rather than 0.1.7-3 that is available in Debian Squeeze. The client can see something going on with the server...
Client >sudo usbip attach --host=192.168.0.120 --busid=1-1.2 (there was no error message)

Client >sudo usbip list --remote raspberrypi
Exportable USB devices
======================
- raspberrypi
1-1.2: Hewlett-Packard : DeskJet F4100 Printer series (03f0:7e04)
: /sys/devices/platform/bcm2708_usb/usb1/1-1/1-1.2
: (Defined at Interface level) (00/00/00)
: 0 - Vendor Specific Class / unknown subclass / unknown protocol (ff/cc/00)
: 1 - Printer / Printer / Bidirectional (07/01/02)
: 2 - Vendor Specific Class / Vendor Specific Subclass / Vendor Specific Protocol (ff/ff/ff)

Looks pretty good, doesn't it?

But lsusb on the client doesn't show any hint of a printer. I can't tell whether the problem is on the server, or the client, or both.

After more googling, I added a line usbipd: 192.168.0.0/28 to the Pi's /etc/hosts.allow and then issued sudo exportfs -ra. I also tried usbip -p and usbip --port on both the client & the server, but both of these returned a message indicating bad command syntax, even though the usbip man page says either of these is supposed to "List virtual USB port status."

Ideas? Thanks for any help & for the good info already posted here.
Will


[1]http://www.howtoforge.com/how-to-set-up ... bian-lenny

kevinstout
Posts: 1
Joined: Thu Oct 25, 2012 8:27 am

Re: USB redirector

Thu Oct 25, 2012 8:29 am

@Secretagent

your instructions forgot to start the daemon ;)

Code: Select all

sudo usbipd -D

mariushb
Posts: 6
Joined: Wed Nov 28, 2012 12:41 pm

Re: USB redirector

Wed Nov 28, 2012 12:45 pm

Hi
I'm trying to follow the command instructions on this site, but everytime I get an error 404, which says my Raspberry pi is unable to find the files. What can I do?

Best regards Marius.

forenbenutzer
Posts: 148
Joined: Thu Aug 02, 2012 7:08 pm

Re: USB redirector

Wed Nov 28, 2012 1:03 pm

mariushb wrote:Hi
I'm trying to follow the command instructions on this site, but everytime I get an error 404, which says my Raspberry pi is unable to find the files. What can I do?

Best regards Marius.
Which instructions do you mean? What command results that error?
Pitendo - Case And Emulator Project - http://edv-huber.com/index.php/problemloesungen/12-pitendo

mariushb
Posts: 6
Joined: Wed Nov 28, 2012 12:41 pm

Re: USB redirector

Wed Nov 28, 2012 10:38 pm

Hi!
Basically these lines:

Code: Select all

sudo apt-get install git
git clone git://github.com/raspberrypi/linux.git kernel
cd kernel
wget https://raw.github.com/raspberrypi/firmware/master/extra/Module.symvers
zcat /proc/config.gz > .config 
It fails allready in the first line!

Best regards Marius

forenbenutzer
Posts: 148
Joined: Thu Aug 02, 2012 7:08 pm

Re: USB redirector

Wed Nov 28, 2012 10:42 pm

Please try "apt-get update" and "apt-get upgrade" before.
And, of course, you could check your internet connection on the raspi, e.g. with "ping raspberrypi.org".
Pitendo - Case And Emulator Project - http://edv-huber.com/index.php/problemloesungen/12-pitendo

mariushb
Posts: 6
Joined: Wed Nov 28, 2012 12:41 pm

Re: USB redirector

Wed Nov 28, 2012 10:53 pm

forenbenutzer wrote:Please try "apt-get update" and "apt-get upgrade" before.
And, of course, you could check your internet connection on the raspi, e.g. with "ping raspberrypi.org".
Okey, I will try this. Thanks for helping!

Best regards Marius

mariushb
Posts: 6
Joined: Wed Nov 28, 2012 12:41 pm

Re: USB redirector

Wed Nov 28, 2012 11:23 pm

"pi@raspberrypi ~ $ apt-get update
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?"

What does that mean? I have internet connection and the latest raspbian..

mariushb
Posts: 6
Joined: Wed Nov 28, 2012 12:41 pm

Re: USB redirector

Wed Nov 28, 2012 11:26 pm

Okey, this actually worked by uising sudo before apt-get..

forenbenutzer
Posts: 148
Joined: Thu Aug 02, 2012 7:08 pm

Re: USB redirector

Wed Nov 28, 2012 11:32 pm

This is not meant as an insult, but: You should learn some linux basics like filesystem, permissions and user management. It could be a good idea to google some howtos and tutorials and you'll have much more fun experimenting with your raspi.

"apt-get" needs root permissions, so you either have to be root, or you could use "sudo" before your commands if your current user is in the sudoers file.

For this special case: "sudo apt-get update" will do the trick. Most instructions do not mention the "sudo" command, you have to find out by yourself, if the current user has enough permissions for certain applications, files or folders.

Edit: Exactly.
Pitendo - Case And Emulator Project - http://edv-huber.com/index.php/problemloesungen/12-pitendo

adrianeccles
Posts: 1
Joined: Fri Nov 30, 2012 12:09 pm

Re: USB redirector

Fri Nov 30, 2012 12:23 pm

Hi All,

This is what I did to get usb redirector working on raspbian.

sudo aptitude install build-essential
sudo apt-get install cvs subversion git-core mercurial

Take ownership of /usr/src:
sudo chown $pi /usr/local/src
sudo chmod u+rwx /usr/local/src

Download and Copy and extract the ARM Version of the software to /usr/src
(http://www.incentivespro.com/usb-redire ... arm.tar.gz)

Perform the procedure described in the following link by Shig
(Ignore the following command: mv rpi-3.2.27)
http://www.raspberrypi.org/phpBB3/viewt ... 71&t=17666

Navigate to /usr/src/usb-redirector-linux-arm
install: sudo ./installer.sh install-server

The installer should auto compile build and install :)

Hope this helps,

Cheers,
Adrian

mariushb
Posts: 6
Joined: Wed Nov 28, 2012 12:41 pm

Re: USB redirector

Sat Dec 01, 2012 5:07 pm

Thank you very much!

This last post really helped me to complete the whole setup!

Now, I have a new problem.. How can I start/ find Usb redirector, and how can I set it up?

I've allreade got contact with the server from my windows pc, but I'm not able to se the usb-device...

Best regards Marius

man_and_pi
Posts: 3
Joined: Fri Dec 28, 2012 9:52 pm

Re: USB redirector

Fri Dec 28, 2012 10:00 pm

I also encounter the error "Fatal: USBip-host not found" after running "sudo modprobe usbip-host".

Is there a step I missed? Or is there a solution to this issue?

man_and_pi
Posts: 3
Joined: Fri Dec 28, 2012 9:52 pm

Re: USB redirector

Sat Dec 29, 2012 6:58 am

Did you get a response to this? what was the resolution?
luin wrote:hey guys can anyone please help me everything worked for me until sudo modprobe usbip-host it says FATAL: Module usbip-host not found. i already have swap activated i am using raspberian

thank you

man_and_pi
Posts: 3
Joined: Fri Dec 28, 2012 9:52 pm

Re: USB redirector

Sat Dec 29, 2012 7:08 am

Turns out i needed to upgrade the pi firmware(missed this step):

https://github.com/Hexxeh/rpi-update#readme

man_and_pi wrote:I also encounter the error "Fatal: USBip-host not found" after running "sudo modprobe usbip-host".

Is there a step I missed? Or is there a solution to this issue?

exco
Posts: 2
Joined: Sat Oct 06, 2012 10:31 pm

Re: USB redirector

Tue Jan 08, 2013 1:45 am

So after 2 evenings of crosscompiling and testing I finally managed to get usbip working on the raspi. I can now control a Lasercutter (usb -> Serial) from a virtual Win 7 machine (Lasersoft Wincrap only).

If there's interest I will put details online and provide a tar file for the ones who just want to use it without hours of fiddling about.

Be warned though - there is a reason for the usbip driver only being in staging - and it will most likely crash your kernel a few times while experimenting with different USB devices.

The throughput I get is abut 4.5MB/s.

obcd
Posts: 917
Joined: Sun Jul 29, 2012 9:06 pm

Re: USB redirector

Tue Jan 08, 2013 8:29 am

I assume you also had to change the version check of the windows user mode client?
I tried to improve the windows client a little.
It has a gui so that it run's minimised with only an icon in the taskbar (next to the clock)
it tries to recreate the connection if it drops (like when you restart the Pi)
it gets it's server ip and port id settings from an ini file
I tried to make it possible to create multiple connections from the same program, but don't succeed to make it run stable.
If you are interested to look at it, just give me a PM.

exco
Posts: 2
Joined: Sat Oct 06, 2012 10:31 pm

Re: USB redirector

Mon Jan 14, 2013 1:08 am

Ok. As promised.

There's a kernel and matching modules in here.

As always - make backups. Hope that helps.

aurevo
Posts: 1
Joined: Wed Feb 06, 2013 1:30 pm

Re: USB redirector

Wed Feb 06, 2013 1:32 pm

Hey, I have downloaded the kernel modules.

Now, with which steps do you get it to work with you raspberry, that USB/IP uses these kernels?

forenbenutzer
Posts: 148
Joined: Thu Aug 02, 2012 7:08 pm

Re: USB redirector

Wed Feb 06, 2013 1:59 pm

I used this howto whenever compiling for the kernel.

http://mitchtech.net/raspberry-pi-kernel-compile/
Pitendo - Case And Emulator Project - http://edv-huber.com/index.php/problemloesungen/12-pitendo

Richyrichrc
Posts: 1
Joined: Thu Feb 07, 2013 12:14 am

Re: USB redirector

Thu Feb 07, 2013 12:30 am

Hi obcd,
I would love a working version of the windows client. Finally got the server working on the pi and heard of version issues.

Tried a workaround which did get past the recv op_common errors (which i believe relate to the version mismatch) however i now get this error and have become stuck:

this new version of the usbip.exe gives me this message and crashes the pi:

Code: Select all

C:\Users\Sarah\Downloads\usbip>usbip -a 192.168.1.100 1-1.3
usbip for windows ($Id$)

new usb device attached to usbvbus port 1

usbip err: c:\users\dev\desktop\usbip_windows-0.2.0.0\usbip_vbus_ui.c: 458 (sock
_read_completed) get overlapping failed: 64
any advice or a working gui version (this would be awesome) are truly welcome

forenbenutzer
Posts: 148
Joined: Thu Aug 02, 2012 7:08 pm

Re: USB redirector

Thu Feb 07, 2013 7:26 am

My next project will be a working usbip. At the moment I have no bluescreens and no crashes on the pi, but windows has to be run in testmode until i found out how to sign the driver with a certificate
Stay tuned.
Pitendo - Case And Emulator Project - http://edv-huber.com/index.php/problemloesungen/12-pitendo

obcd
Posts: 917
Joined: Sun Jul 29, 2012 9:06 pm

Re: USB redirector

Thu Feb 07, 2013 9:39 am

Some of you got a pm.

Benneke
Posts: 1
Joined: Thu Feb 07, 2013 11:25 am

Re: USB redirector

Fri Feb 08, 2013 12:47 pm

I'm trying since a few day to install USBIP on my Raspberry PI.
First i will explain the several steps how i install USBIP on my raspberry pi.
1)enlarge bootfs
2)create and enable swap partition
3)sudo apt-get update
4)sudo apt-get upgrade
5)update firmware explained by Secretagent (clone kernel from github, wget modules.symvers, edit the config file, make oldconfig, depmod -a)
6)update rpi-update explained by Hexxeh (now i'm running on kernel 3.6.11)
7)sudo apt-get install usbip
8)sudo modprobe usbip-host
9)sudo usbip bind -b 1-1.2
10)sudo usbipd

Then on the windows client (developed by obcd) i will retrieve a list of the exportable device.This will give me no problem. The problem occurs when i attache a device. When this happen the raspberry pi crashes. The latest kernel error i have is a kernel staging driver bug at the stub_rx.c file line 366.

I hope that somebody can help me with this error so i can use USBIP on my raspberry pi. The usb device i have connected to the raspberry pi is logitech webcam.

Return to “Troubleshooting”

Who is online

Users browsing this forum: peter.nowee and 28 guests