Hardware and software setup

USB over IP is a hardware solution. Overview and setup

The first article, including USB-Ethernet adapters, was published on our website. Thus, it is impossible to call this class of devices new and unknown - in fact, they appeared as soon as USB interface from a fun curiosity began to turn into something useful, and later evolved along with USB and Ethernet. The first models were designed for USB 1.1 with its maximum bandwidth of 12 Mbps, so it made no sense to demand anything from them that went beyond the “tens” network. However, the next generation of devices is already, but this was required only for compatibility with other cable industries - so as not to “fill up” all devices connected to some simple hub with 10 Mbps. The introduction of USB 2.0 specifications with a bandwidth of up to 480 Mbit / s made it possible to fully use the "hundredth" and start probing Gigabit Ethernet (albeit not at full speed, but still it was significantly faster than the previous standard allowed), and the transition to USB 3.0 completely closed the issue with the fastest of the mass versions of the wired network. If there is demand, it will be possible to increase the speed further - just so far it is not too necessary.

And in themselves, such adapters have never been a subject of mass demand - so much so that many computer users simply do not know about their existence (in fact, this is one of the main reasons why we decided to look at the current state of affairs in this segment). At first, network support was generally considered optional, but for the most popular computers at that time (that is, desktops) it was easily solved using expansion cards (most often, slightly faster than built-in solutions, and better compatible with operating systems of those years). Later, a wired network became mandatory - but in the same way, its initial support by any computer (whether desktop or mobile) became mandatory, that is, the presence of an appropriate adapter in it. Currently, some types computer technology again began to do without the support of wired networks - but mainly because their users are more than satisfied with the colossal developments since then wireless networks. Moreover, owners of computers of "classic" form factors, even if they have a built-in wired Ethernet adapter, often never or almost never use it. If we talk about devices of a “new model”, such as ultrabooks or tablets, which were originally designed not to be tied to a specific place of use, then this is all the more true there.

Theory

On the other hand, sometimes you still need to provide support for wired networks where it was not originally provided. The simplest scenario is if one network interface is provided, but two are needed, and there are no expansion slots in the system (or they are not available) - for example, when it comes to mini-PCs such as the Intel NUC and its analogues. The second case is if there is a regular need to exchange large amounts of information with, for example, ultrabooks: even the best versions wireless standards still slower, besides, their implementation may require the modernization of the entire infrastructure (whereas Gigabit Ethernet began to move into the home segment back in the days of dominance in best case 802.11n with a bandwidth of 150/300 Mbps). It is also possible that the use of a wire is required for safety reasons rather than speed. Or simply there is no Wi-Fi in the right place, but a network outlet has been found since time immemorial. Or, in general, we are talking about a direct connection to some equipment, which is often found in the practice of an operating engineer - and rushing around objects with a small tablet is much more convenient than with a large laptop (in small laptops, the built-in Ethernet support is often also absent).

For all these reasons, USB-Ethernet adapters not only did not die out, but were modernized and became even more versatile and convenient. In particular, this is our today's hero produced by Deppa (worth from 2 to 3 thousand rubles at the time of preparation of the article). Many manufacturers have similar products, and sometimes they are much cheaper. But for a general qualitative analysis of the state of affairs, it is quite suitable for us, since it uses the popular element base- in the form of a Realtek RTL8153 controller. This chip appeared in July 2013, but there is simply no need to improve it yet: networks with higher bandwidth still do not claim to be widely distributed. Actually, as of the end of 2016, even in the segment of HPC clusters, 60% of systems under construction continued to use Gigabit Ethernet for connecting nodes (let alone networks of the scale of "ordinary" enterprises), but 1000Base-T (that is, 1 Gbit / with twisted-pair cable of the fifth category) in the form of specifications "settled down" at the end of the last century.

USB 3.0 (or, as it is recommended to call it now, “USB 3.1 Gen1”) has also been established for a long time, it is suitable for the full implementation of the high-speed capabilities of a gigabit network, it is available in the vast majority of computers and not only computers. It is also worth noting that Realtek at one time provided for the possibility of powering the RTL8153 not only from 5 V ( standard value for USB), but also from 3.3 V, and without the need for additional schemes— the latter can be useful, for example, for developing an Ethernet adapter for iPhone/iPad :) However, the vast majority of network adapters based on this chip are designed to connect to a USB port and still use a “regular” A-type connector. We liked the Deppa adapter just because it already uses a Type-C connector, which makes it easier to connect it not only to desktop computers.


The design of the device directly hints at mobile use: the main part, the size of a lighter (63 × 23 × 14 mm), is connected to the USB connector with a cable only 12 cm long, and the whole structure weighs only 23 grams. For stationary use, this adapter, of course, is also suitable, but first of all, the manufacturer focuses on compatibility with MacBooks and other laptops. But only with them?

Practice

We decided to experiment. To warm up, we took the NUC 7i5BNH, since the “seventh generation” of these mini-PCs has a USB Type-C port in every model. Windows 10 has built-in support for USB devices using the CDC-ECM (Ethernet Control Model) protocol, so a separate installation of any driver is not required - the first time there was much more fuss with USB adapters (which did not add popularity to them). The same applies to Windows 8.1, but for older versions windows driver will have to be installed. However, Realtek still supports even Windows XP.

But the main thing that interested us was a comparison of the speed of work with the built-in Intel i219V network adapter. It turned out that there is a difference. So, for example, according to the results of iperf3, i219V communicated with another computer (more precisely, with its Qualcomm Atheros Killer E2200 network adapter) at a speed of ≈920 Mbps, and RTL8153 provided only ≈840 Mbps. Loading big file with NAS showed the same 10% difference. Is it a lot or a little? We are leaning towards the second option, since even 802.11ac produces about half as much on one stream. Accordingly, if you need a second gigabit adapter for a compact system, such a solution will do. If your “native” Ethernet port burned out, too.

But, of course, it is most interesting when one wired interface no - but you want :) For example, in the case of macbook arm Pro 13″ sample two years ago. As expected, OS X also "picked up" the adapter almost "on the fly", and the results of the check bandwidth turned out to be almost identical to what we got at the NUC. Since these computers have comparable performance, this result is not surprising.

Therefore, we decided to complicate the task and took the budget tablet Chuwi Hi10 Plus - a two hundred bucks product typical for companies from mainland China based on the Atom X5-Z8350. In this case, we got only about 600 Mbps, which, however, firstly, is still much faster than the built-in Wi-Fi 802.11n, and secondly, sometimes the very fact of compatibility is more important. Finally, high speed this tablet does not need to transfer the same files: it “can” write them no faster than 20 MB / s - either to the built-in eMMC memory or microSD card. But, for example, the Hi8 Pro from the same manufacturer is one of the most compact (8″ display, dimensions 211 × 123 × 9.3 mm, weight 350 g) and cheap (about $ 100) “Windows PC”, and it is built on the same platform and is also equipped with USB Type-C - which means that with the help of such an adapter it can be connected to equipment that supports Ethernet, no worse than a full-sized laptop and using the same software. Naturally, this is not very convenient, but it is still possible, and if necessary, this method can be used.

Encouraged by the achieved result, we decided to play some tricks and check the compatibility of the adapter with ... devices running under Android control: Deppa does not promise anything of the kind, but Realtek once mentioned the possibility of such use of the RTL8153 in a press release dedicated to its release. Of course, there are more pitfalls in this case. First, the presence of a USB Type-C connector does not yet guarantee USB OTG support: this form factor connector can be used in specific device only for charging or communication with a computer, but not for connection external devices. For example, this is how smartphones behave and, perhaps, not only them. Secondly, there may be problems with speed, since the new type of connector, although it appeared within the USB 3.1 specification, does not yet guarantee support for faster speed modes than those known since USB 2.0. In particular, all Qualcomm 28nm SoCs and almost all Huawei products, with the exception of the top-end (and relatively new) Kirin 970, definitely do not support USB 3.0. contacts in the connector - this is not prohibited. Third, the general conclusions software support it is extremely difficult to do - a lot can depend on the specific firmware. formally used in android kernel Linux supports CDC-ECM, however, too "thick" software layer "smeared" on top.

Therefore, we did not engage in global mass testing. Just to note that we tested two devices: an Asus ZenPad 3S 10 (Z500KL) tablet running Android 7.0, and Huawei smartphone P20 Pro with EMUI 8.1 (Android 8.1) installed. The adapter did not work with both. True, certain limitations were immediately revealed: it is very likely that Google services are tied to the MAC addresses of the device, so that with a wired connection it is not possible, for example, to enter Google Play. But the browser and various network utilities work - at least no worse than over Wi-Fi. In the case of an Asus tablet, it’s no better: the “heart” of this model is the Qualcomm Snapdragon 650, which immediately limits support to USB 2.0 specifications, and even those do not work at full capacity - we only got ≈25 MB / s when downloading a file. But Huawei P20 Pro gave out twice as much - this is also far from the theoretical maximum, but it clearly demonstrates the presence of USB 3.0 support.


Epicrisis

On this we decided to put an end. The main thing that we managed to determine is that USB-Ethernet adapters are really capable of working not only where they should, but also where wired connection The device was not originally planned "by design". However, the latter, as it seems to us, is better to be considered simply as a funny technological incident - not a single typical scenario comes to mind in which connecting an Android device to a wired network would be vital. Another thing is compact computers with initially "desktop" operating systems (Windows, macOS or Linux). In some cases, they have to replace a desktop computer, and, as we see, the capabilities of the modern implementation of the USB bus are quite enough in order not to suffer too much about the possibilities of expanding a typical desktop lost in the pursuit of portability. In any case, one or more gigabit network adapters can definitely be connected to them, and they will work comparable to the option using "internal" buses. So if for some reason you need to do this, there is a solution. But it certainly does not claim to be massive, since not all users have needed it for a long time.

Virtualization technologies have firmly entered the modern IT world. Today it is impossible to find a company that would not use virtualization solutions ( virtual servers, virtual desktops, VDI) in their work. And everything would be fine and cloudless, but hypervisors, the basis of the infrastructure, also introduced certain restrictions on the created and used virtual machines.
One of the limitations is the lack USB port ov on virtual machines. If earlier we could connect the necessary USB device (for example, a software protection key or a smart card with encryption keys) to a physical server, now - since the servers have become virtual - this task is not so easy to solve. How to solve this problem quickly and efficiently - I will tell in this review.

The first, and seemingly most obvious, solution is to use software emulators ports, but this approach requires you to have an always-on computer on which the emulation software will run. Conclusion: inconvenient, resource-intensive and expensive solution.

Next choice - software and hardware devices to solve the problem of forwarding (emulating) USB ports on a remote machine. Simple, efficient and inexpensive devices. The choice settled on the solutions of Digi International -

AnywhereUSB is a compact USB device hub - with additional connection Ethernet cable.

AnywhereUSB Models

3 models of devices are available for use, designed for a different number of USB ports:
1. AnywhereUSB /2 - 2 USB ports

2. AnywhereUSB/ 5 - 5 USB ports

3. AnywhereUSB /14 - 14 USB ports

Setup and management

Several interfaces are provided for configuring and managing the device:
web interface for configuration, monitoring and administration;
AnywhereUSB configuration utility;
Telnet Command-Line Interface;
Simple Network Management Protocol (SNMP).

To configure the device, consider the Web interface - as the most convenient and simple option.

IP address management

There are several options for assigning an AnywhereUSB IP address:
Static IP;
Dynamic IP assignment - Using Dynamic Host Configuration Protocol (DHCP);
Auto Private IP Addressing (APIPA), best known as Auto-IP;

Network services are easily configured through the web interface

For those who want to fine-tune all the parameters of the network interface, the appropriate tools are available.

The web interface has many additional tools that allow you to view active connections, device status and uptime, configure security features, etc.

Current connections:

Device status:

With the device setup, everything is simple and clear, now let's move on to the machine on which the USB ports are being forwarded.

Setting up the client machine

The setup is simple and intuitive.

All you need to set up:
1. Install drivers for AnywhereUSB;
2. Specify the IP address of the device.

The device is connected, information about the device status is available in the window.

If you need to get detailed information about the connected device, free/occupied ports, you can use the detailed view utility.

It should be noted that the solution is very easy to deploy and reliable in operation. The entire deployment and configuration process takes no more than 30 minutes.

Approximate wiring diagram for AnywhereUSB device

Detailed information about AnywhereUSB devices, download drivers and documentation can be found on the Digi International website -

P.S. This review my colleague wrote, who, unfortunately, is not yet a habrauser.

In one of the previous articles, we discussed ways to connect a variety of entities like files and directories: WebDAV, BitTorrent, SSH, and even video adapter memory. But what if we want to access not a remote or local service, but the devices of a remote machine? For example, forward a USB port to the local machine and use the devices connected to it as local ones.

Peculiarity Unix-like system- treat any of its components as a file - has long been a commonplace in conversations about its internal arrangement. And countless articles about the same Linux are evidence of this. Equipment is no exception. A video card, an audio card, an external device connected via USB, in the understanding of Linux, is nothing more than a file.

It is therefore surprising that of all operating systems only Plan 9 (except for a couple of offshoot projects with a similar fate), in which this approach is brought to its logical conclusion, is able to recognize the equipment of a remote computer without unnecessary gestures and manage it as if it were its own.

In Plan 9, the 9P RPC protocol is responsible for forwarding the equipment. It provides access in general to any files and devices, both local and network. Unfortunately, Linux cannot boast of such a universal tool. But here there are several tools (if not to say - crutches) that provide access to the equipment of a remote machine.

USB

When it comes to transferring equipment to another computer, perhaps the first thing that comes to mind is a webcam on a home laptop or a smartphone connected to it, which must be accessed from a remote desktop. For example, from an office on the other side of the city (in another city, in another country).

In such a case, the utility can help out. Nobody has been developing the utility for a long time, but this has not yet affected its performance - such a package is present in the repositories of most popular distributions.

The first step is to install the USB/IP package on the machine whose devices you want to access from the outside. Next, load the necessary modules:

$ sudo modprobe usbip-core $ sudo modprobe usbip-host

Check if everything loaded correctly:

$ sudo lsmod | grep usbip

And start the server:

$ sudo usbipd -D

Since USB/IP has its own addressing system, independent of the built-in addressing system, the search for devices is performed by the command

$ sudo usbip list -l

It will show a list of all devices connected in this moment on the USB bus.


Now you can proceed directly to sharing the device (let's say it will be a webcam with an index of 2-3 from the list received):

$ sudo usbip bind --busid=2-3

Another check of the correctness of the actions performed:

$ sudo usbip list -r localhost

So, going to the client machine, install USB / IP on it and run:

$ sudo modprobe usbip-core $ sudo modprobe vhci-hcd

We check the availability of the shared equipment on the server according to the list:

$ sudo usbip --list SERVER_ADDRESS

And attach our camera:

$ sudo usbip --attach SERVER_ADDRESS 2-3

Checking the result:

$ sudo usbip --port

Now the remote USB device should appear in the list of local ones, and you can work with it like any other. To check if the connection is correct, run the lsusb command:

INFO

There is a USB/IP client for Windows. However, due to an error in the protocol version in its executable file Out of the box, it doesn't work correctly. Additional gestures are required with the substitution of constants in the source code.

RS232

The most concise solution for mutual sharing in Linux is COM ports. No additional drivers are needed for this. One small utility remserial , available in the sources, is responsible for everything. Suitable for access from Linux to equipment connected via RS232 to remote computer, and for a bunch of two devices with COM ports connected to different machines connected over a network.

You can share RS232 by specifying the network port (-p), speed, stty mode (-s) and port name (here /dev/ttyS0), like this:

$ remserial -d -p 23000 -s "9600 raw" /dev/ttyS0 &

Connect to a COM device located on a remote machine (server) - like this:

$ remserial -d -r server_address -p 23000 -s "9600 raw" /dev/ttyS0 &

It is possible to run several instances of the program with different ports and addresses of connected devices.



Continued available to subscribers only

Option 1. Subscribe to "Hacker" to read all the materials on the site

Subscription will allow you to read ALL paid materials of the site during the specified period. We accept payment bank cards, electronic money and transfers from the accounts of mobile operators.

From a computer that does not have access to a global or local network, there is very little use. But, on a device such as a network card, users do not pay attention until it stops working, or when a machine located in local network no Internet connection required. That's when the "dummies" and have problems.

Every modern motherboard has a built-in adapter, which is used to connect to the network. But quite often it is he who becomes the weak point of the board. The network starts to go haywire until one fine day a fat red cross appears on its icon in the system tray.

How to install a network card if there are no free PCI

Usually in such cases, the user is advised not to touch motherboard, and connect a new external . Such a device is inexpensive, and works perfectly, because. when connected via PCI - slot provides high speed.

However, if all PCI slots are already in use by other devices (video card, sound card, TV tuner, etc.), or an open case is a dense forest for the user, then the fastest and easiest way to solve the problem of a “dead” built-in network card is to install an external adapter.

What is a usb network adapter

External network cards are usually quite small (about the size of a matchbox), made in a plastic case and have a USB cable for connection.

As for the manufacturer, such devices are produced by all well-known manufacturers of computer network devices: D-Link, TP-LINK, Edimax, Intel, Acer, etc.

Ethernet network connection via USB

Connect external network card everyone can. For this USB cable plug into any free USB port on your computer. Typically, these adapters are installed using plug'n'play technology. That is all required drivers Windows will be installed automatically.


This is the connection process network adapter finished. Now you just need to connect the network cable to the connector in the adapter.

You can check the correctness of your actions by finding the section " Network boards' in Device Manager. If everything was done correctly, the name of the installed network adapter will be displayed in the section.

Most Models TP-Link routers have a USB port. It is used to connect USB drives, printers, and USB modems. (on some models). Today I'll show you how to connect a flash drive, or external hard disk to the router, and without complex settings to access USB disk over the network from almost any device. In other words, from a computer, or even mobile device(Android) we will be able to access the flash drive that is connected to router TP-Link. The drive can be accessed by devices that are connected both via Wi-Fi and network cable. It will be possible not only to view files on the drive, but also to write and delete.

And also, a USB flash drive connected to the router can be used for. If your router model has such a function.

Setting up network access to a flash drive through a TP-Link router

Most likely, you will not have to do any settings on the router at all. If there are factory settings, you did not change the USB settings, then sharing is enabled by default.

At the moment, there are routers on the market with old panel management (which is green), and with a new one (blue). As far as I understand, on older models there is no access to the drive through " network". This means that the drive connected to the router will not automatically appear on the "Network" tab in Windows Explorer. It will need to be added manually.

We will start the setup with the simplest, and consider the different nuances.

Connect USB drive to router

First, plug the drive into the USB port of your router. It can be a regular flash drive, or an external one. HDD.

I do not recommend connecting a drive that has important information. Since there is always a risk of losing it. It is better to practice on a blank drive, or on which there is no valuable information. Well, don't change the settings when you don't know what they mean.

If you have a green control panel, then you need to open the tab " USB settings" – "Sharing".

As you can see, the server is enabled by default. To set access settings, create new Accounts, you need to uncheck "Anonymous access to all volumes". You can also disable access by clicking on the appropriate button.

On new routers, with new panel management is needed in the section " Additional settings" open tab "USB settings" - " General access". We accessed through the "Network Places". As you can see, it can be disabled by simply unchecking the box next to it.

That's actually all. If you are interested in accessing files that are on a drive connected to a router from an Android phone or tablet, then I recommend using the ES File Explorer app. It has a network tab where the NAS will be displayed. If it does not appear automatically, then there is an opportunity to connect network drive at \\192.168.0.1, or \\192.168.1.1.

If you can’t log in from a mobile device, then write in the comments. I'll show you in more detail.

Liked the article? Share with friends!
Was this article helpful?
Yes
Not
Thanks for your feedback!
Something went wrong and your vote was not counted.
Thank you. Your message has been sent
Did you find an error in the text?
Select it, click Ctrl+Enter and we'll fix it!