How USB over IP allowed people to forget about distance

Image source

Today, the rapid growth in the number of devices on the Internet and the Internet of Things is no longer surprising. There are many different protocols and technologies on which the processing and exchange of information between devices and, in fact, the very communication of these devices is based.

Some technologies are original canons: they have been used for more than a dozen years and are constantly being improved. And there are those who have either died out or were born, but they got to the masses because of their imperfection, low relevance in relation to market requirements and other things.

This article will focus on technology that does not belong to either group. Without it, computer networks could exist without any problems, but at the same time it can significantly simplify work and reduce operating costs for large enterprises, small organizations and even home users.

The history of the emergence of USB over IP technology


It is difficult to say when exactly this technology appeared in the form in which it is used now. Most likely, with the development of the capabilities of Linux software components, the growth of market needs and the ingenuity of enthusiasts, a modern technology for forwarding USB devices through the network appeared.

Nowadays, there are two popular tools for tracing USB devices: usbip and usbip-win… Both of them aim to share USB devices over an IP network by processing USB I / O messages, encapsulating them in TCP / IP and then transferring the transfer between devices on a client-server network. In this scheme, the devices are connected to the server and the necessary daemon is launched on it.

On the client’s machine, as a rule, any application is launched that does not know how to work with the network, but does an excellent job with USB devices. The forwarding technology just allows you to emulate the local connection of USB devices on the client machine.

Who is interested in it and where it is applied

Benefits of USB network forwarding:

Disadvantages:

Technologies and equipment used

The method of information exchange between local and remote devices differs only in that a virtual bus driver will be used for remote devices: a set of instructions and data. converting logical information or data into physical signals.

Connecting local and remote devices

When applications send a request to an end device, the USB PDD (USB Personal Device Driver) translates the I / O requests into a series of commands that are understandable to USB, and then sends them through the bus driver (the link between the device driver and the end device) as USB blocks. requests to the end device.

Methods for forwarding hardware keys


The Personal Device Driver (PDD), oddly enough, is responsible for managing individual USB devices. PDD sends requests as special URB request blocks (USB Request Block) with which it communicates with USB core (USB Core) – a separate subsystem within the OS that acts as support for USB devices and controllers.

Data exchange model between USB devices and the end user

To implement the forwarding of the USB protocol over an IP network, an entity was developed called

virtual interface of the host controller, it is also Virtual Host Controller Interface

(VHCI). VHCI refers to a virtual controller and is capable of exporting virtual USB devices not supported by physical devices. In Linux, VHCI controllers are used to access USB devices from remote machines connected using the USBIP protocol we already know.

VHCI is equivalent host controller drivers (HCD) and is responsible for handling URB requests. Both VHCI and HCD are responsible for processing URB requests received from the kernel and divide them into simpler requests, called Transfer Descriptions (TD transfer descriptors) for their further transfer to the host interface controller, aka USB controller (Host Controller Interface HCI). This interface operates at the level of physical register transfers and provides communication with peripheral devices connected to USB.

Now about how USB gets to the network. The URB request block is converted to a USB / IP request block by the VHCI driver and sent to the remote computer. The dongle driver has also been added as a new type of USB PDD. The dummy driver is responsible for decoding incoming USB / IP packets from remote machines, extracting the URB and then sending them to local USB devices.

Kernel module

vhci-hcd

Is only a virtual host controller that you can connect virtual devices to.

How it works at Selectel

Let’s consider working with a USB hub using the DistKontrolUSB-16 device as an example. In order to forward a USB device from a hub port, you must:

  1. Create a USB device specifying its Vendor / ProductID (VID / PID) and serial number. It is on it that the hub will select the connected devices:
  2. Specify the external IP address of the client that will connect to the USB hub and specify the ports allowed for connection:
  3. Find the required device in the client application and send a command to use it. After that, the device will be available as a physically connected device.

Conclusion

The described technology is capable of providing the necessary scalability and flexibility in today’s constantly changing environment. Passing USB devices over the network also provides reliability by limiting physical access to devices.

There is no need to move equipment, and the security of the network is increased due to the possibility of using encryption algorithms and setting access rights. Scenario planning is available for each individual device.

Reduced risk and maintenance costs, ease of sharing resources between workstations – all this makes usbip technology competitive in terms of secure authorization and data transfer (with TOTP / HOTP, OCRA) and applicable to a wide range of IT tasks.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *