News:

On Tuesday September 6th the forum will be down for maintenance from 9:30 PM to 11:59 PM PDT

Main Menu

Ethernet over USB Network Interface

Started by N2VWZ, October 22, 2015, 12:52:27 PM

Previous topic - Next topic

N2VWZ

I'm would like to be able to use my Obi 200/202 with LTE MiFi (wireless hot spot) devices.  LTE MiFi devices do not support an Ethernet connection, but can provide a network connection through the USB port when placed in tethering mode.

Unfortunately, Obihai devices do not support network connections via USB.  I would like to see this feature added to the firmware.

SteveInWA

That is highly unlikely to be implemented.  Obihai would have to add a s__tload of extra firmware to provide the USB networking stack and unique driver for every model of USB-attached network dongle or hotspot.

Instead:  if you are using a hotspot that bridges LTE with WiFi instead of, or in addition to USB (or, for example, a LTE Android phone with tethering included in your plan), then all you need is an OBi WiFi dongle and an OBi 20x series box.  Plug the OBiWiFi into the OBi, turn on your LTE<-->WiFi device, and you're all set.

N2VWZ

Quote from: SteveInWA on October 22, 2015, 05:29:05 PM
That is highly unlikely to be implemented.  Obihai would have to add a s__tload of extra firmware to provide the USB networking stack and unique driver for every model of USB-attached network dongle or hotspot.

This is not the case. 

Ethernet over USB is a standard protocol.  The USB-eth module in Linux emulates an Ethernet device, using USB as the physical medium.  All that is needed is to incorporate this module in the compiled code.  It's a very simple thing to implement.

A separate driver for each brand of device is not necessary.

I'm using Obi WiFi now.  It's very slow establishing network connections.  I don't know why this is the case, my Android phone establishes WiFi network connections almost instantaneously.

drgeoff

Quote from: N2VWZ on October 23, 2015, 11:47:23 AM
Ethernet over USB is a standard protocol.
If it is a standard protocol, why does https://en.wikipedia.org/wiki/Ethernet_over_USB say:

"There are numerous protocols for Ethernet-style networking over USB."

Is there one which is implemented in all, or even the majority, of USB dongles?

N2VWZ

Quote from: drgeoff on October 23, 2015, 02:52:28 PM
Quote from: N2VWZ on October 23, 2015, 11:47:23 AM
Ethernet over USB is a standard protocol.
If it is a standard protocol, why does https://en.wikipedia.org/wiki/Ethernet_over_USB say:

"There are numerous protocols for Ethernet-style networking over USB."

Is there one which is implemented in all, or even the majority, of USB dongles?

The drivers are already included in the Linux OS.  Writing new code for every Ethernet over USB device is not necessary.

http://www.embedded.com/design/connectivity/4024491/Linux-based-USB-Devices

Ethernet over USB

If using a USB link as a high-speed serial port isn't what you want, another alternative is to treat USB as an Ethernet network. Linux has modules to implement both the host and device sides of this capability. The Linux kernel for the iPAQ uses this communications strategy exclusively, since the iPAQ hardware has neither an accessible serial port nor a dedicated network interface.

In the StrongARM Linux kernel, the usb-eth module (arch/arm/mach-sa1100/usb-eth.c) emulates an imaginary Ethernet device that uses USB as the physical media. Once created, this network interface can be assigned an IP address and otherwise treated as though it were ordinary Ethernet hardware. Once the USB host connects, the usb-eth module allows the USB device to "see" the Internet (if the Internet is there), ping other IP addresses, and even "talk" DHCP, HTTP, NFS, telnet, and e-mail. In short, any applications that work over real Ethernet interfaces will work over a usb-eth interface without modification, because they can't tell that they aren't using real Ethernet hardware.

drgeoff

One of us has a basic misunderstanding. My thinking is that the USB host device having a Linux kernel which has an ethernet over USB driver is not sufficient to guarantee that a USB slave device has a compatible 'driver'.

If all cellular/Wi-Fi/Wimax/LTE etc USB dongles had a standardised software interface for IP over USB it would not be necessary for the manufacturers to provide their own Windows drivers. That they do prompts me to think that those dongles do not implement a standardised ethernet over USB interface. Hence the answer from SteveInWA seems valid to me.