USBIP on GL-AX1800 Flint

As USB webcams are not really working on these routers I wanted to try USBIP. Now I could install these packages: kmod-usbip-client kmod-usbip-server kmod-usbip but looks like there is no usbip binary:

root@GL-AX1800:~# usbip
-ash: usbip: not found

Is there anything OK with those kmod packages or anything is missing?

You may have to run the program with the full directory path (e.g., /usr/sbin/…/usbip). See if you can find the installation directory.

I do not work for and I am not directly associated with GL.iNet

There is no binary on the file system, already searched through it.

Great start. And what does your (or any) documentation of usbip says, how to go on?

I don’t use usbip, so I googled for ‘opkg usbip’ and got: https://openwrt.org/docs/guide-user/services/usb.iptunnel

You installed kmod-… This standing for something like ‘kernel module’.
Every of your operating systems has different ‘areas/layer/sections/…’. somewhere at the ring 0 is your hardware, roundabout ring 1 is ‘the kernel’ (the technical real operating system). Above are userland tools, the binaries and Programms you know, which you are working every day. A set of this tools is known as distribution.

And because the kernel needs to be more flexible today, where we have various hardware and don’t want to recompile for any possible set of hardware, there are modules, that can be loaded into the kernel, to access special hardware.

You installed the kernel module for a layer between IP (Net) and USB (xHCI) … But no userland tools to interact with this modules.

According to the link above, your solution is:

opkg install kmod-usb-ohci usbip-server usbip-client

Already went through that and those are already installed.

This is not written above.
If the only answer of all tried explainarion from your side is ‘I already did this’, I am not motivated to answer any further.

There are two most likely situation:

  1. The wrong libusb package was used and the install command gave errors on the console. We can’t see the errors unless you provide them.

  2. We take a look into the source and peek where the script wants to install the binary.
    But because you have not provided any source of your used packages, I’ll take the first Google hit: packages/Makefile at openwrt-21.02 · openwrt/packages · GitHub
    Line 90 wants to copy the binary libusb in /usr/sbin/

$(CP) $(PKG_INSTALL_DIR)/usr/sbin/usbip $(1)/usr/sbin

So, if you take a look into ls /usr/sbin/usb* and find no file usbip, jump to 1 and/or give more details.

Solved by using VirtualHere instead, if anyone needs it use “VirtualHere USB Server for Linux (ARM)”:
https://virtualhere.com/usb_server_software
Works immediately after starting the one single binary. Trial version can share 1 device.

1 Like

Hi,

Could you explain how you installed virtualhere on your Flint ?

I tried using their script:

curl https://raw.githubusercontent.com/virtualhere/script/main/install_server | sudo sh

It downloads the file, but i got the following error message:

Error, only systemd is supported

I also tried using the command

./vhusbdarm

on the downloaded file, but then I got

Permission denied

Am I missing some simple thing?

Thanks for your help,

Answering myself, I forgot to make the file executable :roll_eyes:

chmod +x vhusbdarm

I just need to start virtualhere as a service at boot, how can I do that on the Flint?

Many thanks !

Hi, sorry for the late response, here is how I did it:

Add this script to /etc/init.d

#!/bin/sh /etc/rc.common

START=10 
STOP=15

start() {        
    /root/vhusb/vhusbdarm -b -c /root/vhusb/config.ini
}

Make it executable:
chmod +x /etc/init.d/vhusb

Enable it:
/etc/init.d/vhusb enable

And you will need to add a config.ini next to your binary also, I cannot remember how I created that, I believe virtualhere has some parameters to create it.

ServerName=MyServer
AllowedDevices=Cannot remeber how to get this id
It=Some timestamp here
EasyFindId=Cannot remember how I got this id
EasyFindPin=Cannot remember how I got this pin

Hope it helps

Hello nnz,

Thanks for your answer.

I went a different route, just adding this in /etc/rc.local before exit 0

/usr/bin/vhusbdarm &

The config.ini file is created the first time you start virtualhere, you don’t need to create it.