USB/IP dependencies missing

Hi,

i'm very new to OpenWRT world and i was about to use one of my routers as an USB/IP server. So i installed PandoraBox to my Xiaomi Mi Router 3, i installed kmod-usbip, kmod-usbip-client, kmod-usbip-server (tested web-manager and even opkg via SSH), i added kernel modules and was eager for testing.
Unfortunately when i try commands "usbip" or "usbipd" the system throws at me this:

[root@PandoraBox:/root]#usbip -l
-ash: usbip: not found
[root@PandoraBox:/root]#usbipd -D
-ash: usbipd: not found

I've checked file paths and there truly (probably) are missing crucial binaries(usbip, usbipd, usb.ids) of this feature. Is there any non-overkill solution for such noob? I even tried to compile my own firmware according to OpenWRT tutorial but it fails everytime on "world" error. It seems like there isn't the profile for "Xiaomi Mi Router 3" anyway so who knows if it would even work.

Thank you for any advice!

PandoraBox is not OpenWrt -- problems with their packages should be resolved through their support channels.

I haven't tried to keep track of the Xiaomi models and several have "3" in their name. I'd search the forum here to find out what the status of OpenWrt support for your specific model is.

It may be the one described at https://openwrt.org/toh/xiaomi/mir3 and/or

2 Likes

Oh, i thought so when i followed the instructions in OpenWRT website.
https://openwrt.org/toh/xiaomi/mir3#how_to_flash_pandorabox_openwrt

Ok, now i've noticed there is also a "raw" OpenWRT firmware so i'll try that one.

Anyway, there shouldn't be such problem, right? The package should include everything (i'm asking because i've tested two other routers with the same result and those both have OpenWRT firmware).

From feeds/packages/net/usbip/Makefile

define Package/usbip
  $(call Package/usbip/Default)
  TITLE+= (common)
  DEPENDS+= +libwrap +kmod-usbip +libudev-fbsd +USE_GLIBC:libbsd
endef

define Package/usbip-client
  $(call Package/usbip/Default)
  TITLE+= (client)
  DEPENDS+= usbip +kmod-usbip-client
endef

define Package/usbip-server
  $(call Package/usbip/Default)
  TITLE+= (server)
  DEPENDS+= usbip +kmod-usbip-server
endef

[...]

define Package/usbip/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libusbip.so.* $(1)/usr/lib/
        $(INSTALL_DIR) $(1)/usr/share/hwdata
        $(CP) $(DL_DIR)/usb.ids.$(USB_IDS_VER) $(1)/usr/share/hwdata/usb.ids
endef

define Package/usbip-client/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(CP) $(PKG_INSTALL_DIR)/usr/sbin/usbip $(1)/usr/sbin/
endef

define Package/usbip-server/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(CP) $(PKG_INSTALL_DIR)/usr/sbin/usbipd $(1)/usr/sbin/
endef

so it looks like you need to explicitly install the client and/or server (which should install the kmods and library as a dependency).

1 Like

Now i get it! (Thank you) Finally I was able to flash OpenWRT on my Xiaomi R3 and it really does that (PandoraBox is missing the normal "usbip*" packages completely).

Unfortunately it responds by:

Collected errors:
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-usbip:
 * 	kernel (= 4.14.131-1-f908844d5e5aab0a4b27f7d4c77655d0)
 * opkg_install_cmd: Cannot install package kmod-usbip.

To my understanding, the firmware should include 4.14.131 kernel version and many other packages already installed are "4.14.131-1" so the rest of the numbers is what opkg bother (right?). But even i've forced the install i'm not able to list USB devices via USBIP so there probably is something wrong.

Did you install a snapshot? The kernel package in your device us now too old for the packages available on the repos.

3 Likes

So the numbers refer even for sub-revisions of the kernel? Dang it, that means i should probably look for new HW anyway.

Thank you guys, you helped me a lot actually!

That number is a hash calculated from the kernel config file.

2 Likes