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: [OpenWrt Wiki] USB over IP tunnel

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/net/usbip/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.