Problem Linux 3.1.10 to Win64

  • WinOSS

    WinOSS - 2012-01-22

    Dear forum and whom it might concern,

    I managed to compile usbip on OpenWrt with kernel 3.1, the daemon is running, reachable and exporting devices just fine. However, on the client side with Win7 x64 (yes, the driver is installed and visible in the device manager and yes, I am running the command as amin) I am getting well-known error messages, but I was unable to find a solution.  This might be because:

    a) there is a version mismatch - in this case how to I recompile the windows usbip.exe and would that help at all w/o being able to sign an updated driver?

    b) some other problem, maybe the windows client is just plain broken with recent servers?

    … server: Linux 3.1.10 MIPS (OpenWrt on ar71xx / Linksys WNDR3700):

    root@PHOENIX:/# usbipd --debug
    Protocol spec without prior Class and Subclass spec at line 4297
    usbipd: info: starting usbipd (usbip-utils 1.1.1)
    usbipd: info: listening on :::3240
    usbipd: debug: usbipd.c:394:[listen_all_addrinfo] listening on 1 address
    usbipd: info: connection from fe80::f18d:a533:65d5:5e00:52397
    usbip: debug: usbip_network.c:149:[usbip_net_recv_op_common] version mismatch: 262 273
    usbipd: debug: usbipd.c:230:[recv_pdu] could not receive opcode: 0

    … client: Windows 7 x64:

    [C:\Windows]usbip --debug -l fe80::c03f:eff:fe7a:9e87
    usbip dbg: usbip_network.c: 223 (tcp_connect ) trying fe80::c03f:eff:fe7a:9e87 port 3240
    usbip dbg: usbip_network.c: 243 (tcp_connect ) connected to fe80::c03f:eff:fe7a:
    9e87:3240 - fe80::c03f:eff:fe7a:9e87
    usbip err: usbip_network.c: 121 (usbip_recv_op_common) recv op_common, -1
    usbip err:       usbip.c: 216 (query_exported_devices) recv op_common
    usbip err:       usbip.c: 288 (show_exported_devices) query
  • WinOSS

    WinOSS - 2012-01-22

    … I forgot to mention: I am not using the outdated, broken usbip package from the OpenWrt repository, but the kernel modules and userspace component from the official Linux tree 3.1.10 - so that shouldn't be the probem.

    Thanks for any input you have, the linux->win scenario should be quite common.

  • WinOSS

    WinOSS - 2012-01-31

    I solved it myself: The version mismatch was the problem, I had to recompile the daemon to match the windows exe version. Now I'm running OpenWrt MIPS / Linux 3.2.2 to Win7 x64 with no problem and no bluescreens yet.

  • Craig

    Craig - 2012-02-12

    Thanks for the solution winoss. I have the same problem.

    Having a look at usbip_windows_v0.2.0.0_signed\usbip_protocol.h there is a version define
    #define USBIP_VERSION 0x000106
    0x111 makes version 262

    In the linux 3.1.10 kernel, in usbip/userspace/config.h it is defined as
    #define USBIP_VERSION 0x00000111
    (Decimal 273)

    So this would suggest the Win7 64 bit driver is older than the code in Linux 3.1.10.

    Interestingly Linux 3.2.2 still has it defined as 273, so there must be provisions for backwards compatibility in the later versions of the kernel.

    Off to give Linux 3.2.2 a shot.

  • WinOSS

    WinOSS - 2012-04-22

    I got it working in the meantime, and lately there's even an OpenWrt patch in patchwork that might be added sooner or probably later to trunk:

    The problem is that newer kernels have an updated userspace part that doesn't work with the legacy out-of-tree versions. Once you use the kernel module with the matching userspace program (all to be found in the staging tree), it works with the windows driver from sourceforge just fine - the attached devices on the router are seen and can be used with windows. So either use the patch or cross-compile the staging userspace part yourself.


Log in to post a comment.