Usb over network client linux

USB/IP

USB/IP Project aims to develop a general USB device sharing system over IP network. To share USB devices between computers with their full functionality, USB/IP encapsulates «USB I/O messages» into TCP/IP payloads and transmits them between computers.

Installation

Usage

Server setup

The server should have the physical USB device connected to it, and the usbip_host USB/IP kernel module loaded. Then start and enable the USB/IP systemd service usbipd.service . The daemon will accept connections on TCP port 3240.

List the connected devices:

Bind the required device. For example, to share the device having busid 1-1.5:

After binding, the device can be accessed from the client.

Binding with systemd service

In order to make binding persistent following systemd template unit file can be used:

/etc/systemd/system/usbip-bind@.service
[Unit] Description=USB-IP Binding on bus id %I After=network-online.target usbipd.service Wants=network-online.target Requires=usbipd.service #DefaultInstance=1-1.5 [Service] Type=simple ExecStart=/usr/bin/usbip bind -b %i RemainAfterExit=yes ExecStop=/usr/bin/usbip unbind -b %i Restart=on-failure [Install] WantedBy=multi-user.target

So, e.g., to share the device having busid 1-1, one should start/enable usbip-bind@1-1.service .

Client setup

Make sure the vhci-hcd kernel module is loaded.

Then list devices available on the server:

$ usbip list -r server_IP_address 

Attach the required device. For example, to attach the device having busid 1-1.5:

$ usbip attach -r server_IP_address -b 1-1.5

Disconnecting devices

A device can be disconnected only after detaching it on the client.

$ usbip detach -p port_number 

Unbind the device on the server:

$ usbip unbind -b busid 

Note: USB/IP by default requires port 3240 to be open. If a firewall is running, make sure that this port is open. For detailed instruction on configuring the firewall, go to Category:Firewalls.

Tips and tricks

Binding by vendor/device ID

If bus ids are inconsistent and dynamically assigned at each system boot, binding by vendor/device ID can be used alternatively:

/etc/systemd/system/usbip-bind@.service
[Unit] Description=USB-IP Binding device id %I After=network-online.target usbipd.service Wants=network-online.target Requires=usbipd.service [Service] Type=simple ExecStart=/bin/sh -c "/usr/sbin/usbip bind --$(/usr/sbin/usbip list -p -l | grep '#usbid=%i#' | cut '-d#' -f1)" RemainAfterExit=yes ExecStop=/bin/sh -c "/usr/sbin/usbip unbind --$(/usr/sbin/usbip list -p -l | grep '#usbid=%i#' | cut '-d#' -f1)" Restart=on-failure [Install] WantedBy=multi-user.target

So, e.g., to share the device having vendor/device ID 0924:3d68, one should start/enable usbip-bind@0924:3d68.service .

Note: Such a binding method cannot work correctly for multiple devices with the same vendor/device ID.

Then client setup will be like this:

$ usbip attach -r server_IP_address --$(/usr/sbin/usbip list -p -r server_IP_address | grep '#usbid=0924:3d68#' | cut '-d#' -f1)

Note: If the previous command fails, check if -p flag in usbip list -p -r server_IP_address is working properly. If not, use the following line instead:

$ usbip attach -r server_IP_address -b $(/usr/sbin/usbip list -p -r server_IP_address | grep '0924:3d68' | cut '-d:' -f1 | awk '')
c:\> for /f "tokens=1 delims=:, " %a in ('usbip list -r server_IP_address ^| findstr /r /c:"0924:3d68"') do start usbip attach -r server_IP_address -b %a

Sharing devices configured with files in /etc/..

usbip-systemd AUR provides systemd service files for binding by vendor/device id and for connecting by hostname and vendor/device id.

Читайте также:  Xerox workcentre 3325 driver linux

Server setup

For each device create a device.conf in /etc/usbip/bind-devices/ with USBIP_DEVICE set to the vendor/product id, e.g.:

/etc/usbip/bind-devices/example-device.conf

To bind a cofigured device start/enable the service usbip-bind@example-device.service

Client setup

For each host/device create a device.conf in /etc/usbip/remote-devices/ with HOST set and USBIP_DEVICE set to the vendor/product id, e.g.:

/etc/usbip/remote-devices/example-device.conf
USBIP_HOST=example-host USBIP_DEVICE=0924:3d68

Make sure your server is running and the configured device is bound, then start or stop the service usbip@example-device.service

See also

Источник

Graphical User Interface

Click Add Server button. Specify the address and TCP port (default 33000) of the remote USB over Network Server. Then click OK .

Adding USB over Network Server

As a result, specified USB over Network Server will be added to the list of servers. If the server is active at the moment, the program will show the real-time list of USB devices shared on the server.

USB Devices List

USB Server Statuses

USB Server is unavailable.

USB Server connection is disallowed for some reason.

Connecting the Remote USB Device

USB Devices List

Select USB device and click Connect button. If the selected device is available on the server, it will be connected to your computer over the network. If the device cannot be connected for some reason, you will be notified.

USB Devices List

Disconnecting the Remote USB Device

When remote USB device is connected to your computer, it is inaccessible for other users. To disconnect the USB device you have to select it from the list of devices and click Disconnect button.

Removing the USB Server

Select the Server that you want to remove from the list and click Remove Server button. All connected devices shared on the Server will be disconnected automatically.

Источник

Download USB over Network

15-day trial, only one USB device can be connected by client.

Release Date: 18/05/2021

Total Size: 33 MB

— Stability of command-line utility has been improved. — Issue with driver signature and some other minor bugs have been fixed.

w Legacy versions of USB over Network are no longer supported. We highly recommend you to upgrade to the current version.

Show only important releases
Display full archive

— A new major feature has been added: Device Tags. It allows to organize large pool of similar devices in groups and enable notification or auto connect when any of these devices becomes available. — Port names and drive letters are now showing on Client side. — Also, a lot of small fixes for device compatibility has been made.

Читайте также:  Linux сброс настроек монитора

— Fixed bugs with SSL trusted authority certificate, callback reconnection, connection to License Server and some devices.

— Easy understandable symlinks for Clients, Servers and devices. — Autoconnect of all devices on callback connection. — Ability to continue local usage of the device which was shared but not yet connected by Client. — Ability to disconnect a device from Client without unsharing. — The new Bus driver brings full support for USB 3.0 and great performance improvement under the latest Windows OS. — UI was enhanced and polished — Performance and quality tweaks are added for HID devices. — Fine-tuning of interval for broken connection detection is added. — A lot of bugs fixed as well.

— New features have been added: the possibility to use SSL in callback connections, devices can be connected by its VID/PID in command-line utility. — Sharing Rule Manager has been improved also: now it is possible to assign nickname to a device and change its serial number. — Overall stability and performance have been improved for high load situations with extremely large number of Servers or Clients or devices. Compatibility with some USB devices has been enhanced as well.

— Entering license key with non-admin privileges has been fixed. — Callback connection SSL bug has been fixed.

— Compatibility with Windows 10 was added. — Program crash caused by some USB hubs was fixed. — USB 3.0 speed emulation was fixed.

— Windows 8.1 support significantly improved. — Callback connection supported now. — Password protection for the specified device added. — New licensing for Remote Support Operators. — Connect of specified remote USB port. — One-time connect support.

— Bug causing reconnection failure after the loss of network connection has been fixed. — Drivers have been updated.

— Data transfer speed for audio and video devices significantly increased. — Support of Microsoft webcam added. — Device names displayed correctly now. — Command line utility added on Client side.

— From now on it’s possible to connect shared USB device even if it’s occupied by a remote user (as a result the remote user becomes disconnected). — Issue that led to incorrect server operation when trying to share virtual USB device fixed.

Version: 6.0

OS: Linux kernel 2.6.32 or greater, libssl 1.0 or greater

15-day trial, only one USB device can be connected by client.

Release Date: 10/09/2019

— Improved performance and stability for a high-speed USB 3.0 devices thanks to a multiprocessing on the Server side. — Automatic creation of sharing rules. — Ability to create callback connection to Clients. — The Client side obtains improved UI, enhanced device connecting rules, support for callback connections, SSL and scripts on device connect/disconnect.

Читайте также:  Powershell remote to linux

w Legacy versions of USB over Network (Linux version) are no longer supported. We highly recommend you to upgrade to the current version.

Show only important releases
Display full archive

— GUI added in Server. — Command-line utility improved. — Compatibility with latest OpenSSL versions implemented. — Issue with Site License fixed.

— Server can now connect to the FabulaTech License Server. — Client can now connect to several Servers. — GUI added in Client.

— Server: — SSL PEM files support added. — HID device support improved (especially for Wacom tablets). — More important info added to command line utility. — Network server discovery support. — It’s possible to apply new configuration without daemon restart. — Device sharing rules improved. — Callback connection supported now. — Reset device support on the device connect added. — Password protection for the specified device added. — USB 3.0 support improved. — Client: — USB 3.0 support improved. — Support of isochronous data transfer improved (webcams, audio devices). — Now it’s possible to connect to password protected servers and devices. — Reconnect after network broken connection added. — New Linux kernel support improved. — More important info added to command line utility. — It’s possible to connect the remote device, even if the device is connected by another client. The device gets disconnected from remote client in such case (if allowed). — The max. number of connected USB devices is increased.

fixed: — bug with not using alternative settings on physical side — not sending special MaximumTransfersize from from physical side — README is added in package — correctly treat physical:port argument from command line — Seg Fault when unknown physical side name is specified to the virtual side daemon from command line

— Fixed: isochronous transfers on big-endian systems (armeb, mips). — Fixed: better support for string descriptors. — Added: delayed hotplug notification (for slow devices). — Added: open control utility protocol. — Removed: HAL (obsolete). Only udev and usbfs are supported. — Simplified installation procedure (now you can install just from tar.gz archive).

— Device driver is not needed anymore on server side when sharing device manually. — Individual device sharing for identical USB devices (the same Hardware ID) is implemented. — Unicode support. — Citrix support is improved. — udev support is added for Linux version.

— Initial SSL support added. — Many bugs fixed. — This version is not compatible with the previous one.

Источник

Оцените статью
Adblock
detector