Menu

Linux client not finding Raspbian server

Help
2022-02-10
2022-03-31
  • Chili.Willy

    Chili.Willy - 2022-02-10

    I've been using usbip to scan for a long time. The server is a Raspberry Pi, a Model B I think (old!) with Raspbian Bullseye. The client is a laptop running Debian 11 Bullseye. It may have been when I updated the client from 10 Buster to 11 Bullseye that usbip stopped working. (I had updated the Pi a few months earlier.)

    lsmod on the R. Pi server shows that usbip_host, usbip_core, and configs are loaded. usbip list -l shows 3 devices including the Brother all-in-one that includes the scanner. When I issue usbipd, the Pi responds
    usbipd: info: starting usbipd (usbip-utils 2.0)
    usbipd: info: listening on 0.0.0.0:3240
    usbipd: info: listening on :::3240

    lsmod in the client shows that vhci_hcd is loaded (so is usbip_core, if it matters). When I issue usbip list -r raspberrypi, there’s no response for maybe half a minute. There’s no additional output from usbipd on the Pi. In another console of the client, I issued lsof -iTCP and the last line (plus headings) is
    COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
    usbip 132669 root 3u IPv4 797685 0t0 TCP W520:45340->raspberrypi:3240 (SYN_SENT)
    I think this means that the ports match in the Pi and the client (port 3240). But dmesg on the client doesn’t show any activity.
    After a while (30 sec.?) the client responds to the usbip list -r command with
    usbip: error: could not connect to raspberrypi:3240: System error

    This is all the troubleshooting I know how to do. How can I find out why it isn’t working? Thanks for any ideas.

     
  • Chili.Willy

    Chili.Willy - 2022-03-18

    Update. No progress, but I have new information. usbip has been updated in both the Raspberry Pi server and the Debian Bullseye client: usbip-utils 2.0.

    When I bind my all-in-one printer to the R. Pi server with sudo usbip bind -b 1-1.3.2, then I can start usbipd with the debug option, usbipd -d. This output results:

    usbipd: info: starting usbipd (usbip-utils 2.0)
    usbipd: debug: usbipd.c:389:[listen_all_addrinfo] opening 0.0.0.0:3240
    usbip: debug: usbip_network.c:253:[usbip_net_set_v6only] setsockopt: IPV6_V6ONLY
    usbipd: info: listening on 0.0.0.0:3240
    usbipd: debug: usbipd.c:389:[listen_all_addrinfo] opening :::3240
    usbipd: info: listening on :::3240
    usbipd: debug: usbipd.c:544:[do_standalone_mode] listening on 2 addresses
    usbipd: debug: usbipd.c:575:[do_standalone_mode] heartbeat timeout on ppoll()
    

    and the last line with “heartbeat” repeats every few seconds.

    If I start another console in the R. Pi server and issue sudo usbip list -r 127.0.0.1, I get the desired output:

    Exportable USB devices 
     - 127.0.0.1
        1-1.3.2: Brother Industries, Ltd : MFC-J680DW (04f9:0388)
               : /sys/devices/platform/soc/20980000.usb/usb1/1-1/1-1.3/1-1.3.2
               : (Defined at Interface level) (00/00/00)
    

    and in the original server console, usbipd has responded:

    usbipd: debug: usbipd.c:569:[do_standalone_mode] read event on fd[0]=3
    usbipd: info: connection from 127.0.0.1:52654
    usbipd: info: received request: 0x8005(5)
    usbipd: info: exportable devices: 1
    libusbip: debug: usbip_common.c:114:[dump_usb_device] path                 = /sys/devices/platform/soc/20980000.usb/usb1/1-1/1-1.3/1-1.3.2
    libusbip: debug: usbip_common.c:115:[dump_usb_device] busid                = 1-1.3.2
    libusbip: debug: usbip_common.c:121:[dump_usb_device] Device(C/SC/P)       = (Defined at Interface level) (00/00/00)
    libusbip: debug: usbip_common.c:123:[dump_usb_device] bcdDevice            = 100
    libusbip: debug: usbip_common.c:128:[dump_usb_device] Vendor/Product       = unknown vendor : unknown product (04f9:0388)
    libusbip: debug: usbip_common.c:130:[dump_usb_device] bNumConfigurations   = 1
    libusbip: debug: usbip_common.c:131:[dump_usb_device] bNumInterfaces       = 0
    libusbip: debug: usbip_common.c:133:[dump_usb_device] speed                = High Speed(480Mbps)
    libusbip: debug: usbip_common.c:136:[dump_usb_device] busnum               = 1
    libusbip: debug: usbip_common.c:137:[dump_usb_device] devnum               = 6
    usbipd: info: request 0x8005(5): complete
    

    But if I go to the client now, and type sudo usbip list -r raspberrypi (or if I use the Pi's IP address on the LAN), there is no response for a while and finally the client prints that system error message:
    usbip: error: could not connect to raspberrypi:3240: System error
    Meanwhile on the Pi, in the usbipd console, there's no response at all. It just keeps printing the "heartbeat" line.

    So it seems that usbipd is not “hearing” requests from the client. Like before in my original post, I don't know what to do about it.

    Any ideas? Thanks for any suggestions.

     
  • Chili.Willy

    Chili.Willy - 2022-03-31

    Update:
    Since the previous post, usbip has been upgraded on the client (Debian Bullseye laptop) but not on the Raspberry Pi Raspbian Bullseye server. There's one new thing. When I issue this command on the R. Pi server:
    sudo usbip list -r 127.0.0.1
    telling it to look for bound devices, it prints the following line:
    usbip: error: Protocol spec without prior Class and Subclass spec at line 23299
    and then it prints the CORRECT output, showing the Brother all-in-one inkjet.
    When I issue, on the client laptop
    sudo usbip list -r raspberrypi
    it prints the same error line as above, and then the same error line that it's been printing all along, like this:
    usbip: error: Protocol spec without prior Class and Subclass spec at line 23299
    usbip: error: could not connect to raspberrypi:3240: System error
    In case you're wondering, yes, the R. Pi is pingable by the name "raspberrypi".

     

Log in to post a comment.