Posted: Mon Dec 28, 2020 4:07 Post subject: Is it possible to turn USB port, into an Ethernet port?
IS there some sort of way to have the USB port recognized as an Ethernet port??
For instance, say I plug in a Raspberry Pi Zero into the USB Port... is it possible for the Raspberry Pi Zero to get Ethernet Access via the USB Cable? I want to use the Pi Zero for a PiHole installation.
(I currently have PiHole running on a Pi 3B, but I believe that device might be overkill, and I'd like to free up the 3B for other uses. )
I know the other way to do this, is to use an Ethernet to USB adapter... but I was wondering if it was possible to do it through the router's settings or via command line in some way? That way I can save on some cable clutter by only having one cable plug into the router rather than two. (I think the the Pi Zero can be powered by the router )
Joined: 21 Jan 2017 Posts: 1782 Location: Illinois Moderator
Posted: Mon Dec 28, 2020 4:32 Post subject:
This is not possible. The network traffic cannot go over USB. Nor are there any drivers supported in dd-wrt for usb to ethernet adapters AFAIK...so what you want to do is not possible. _________________ FORUM RULES
Why don't you just plug the Pi Zero into the USB port for power and then connect it via WiFi?
Works flawlessly.
I don't think the few milliseconds of latency will make a difference for DNS resolution.
Nor are there any drivers supported in dd-wrt for usb to ethernet adapters AFAIK...so what you want to do is not possible.
How hard could it be to build kernel modules to support USB to Ethernet adaptors? This is actually a great idea, imo. The ASIX AX88179 chipset driver is already built into the mainstream kernel (one of many). I suppose it is removed in the DD-WRT kernel because of space limitations. Perhaps we could add a modules folder in /opt and insmod our own, when needed or desired. Would be a fantastic addition to DDWRT I think. What do you think about this?
EDIT: If I wanted to experiment with this, I assume the standard kernel headers (for a given version) and a cross-compile environment is all I would need? _________________ Linksys EA8500 (Internet Gateway, AP/VAP) - DD-WRT r53562
Features in use: WDS-AP, Multiple VLANs, Samba, WireGuard, Entware: mqtt, mlocate
Netgear R7800 (WDS-AP, WAP, VAP) - DD-WRT r53562
Features in use: multiple VLANs over single trunk port
Linksys EA8500 WDS Station x2 - DD-WRT r53562
Netgear R6400v2 WAP, VAP 2.4ghz only w/VLANs over single trunk port.
OSes: Fedora 38, 9 RPis (2,3,4,5), 20 ESP8266s: Straight from Amiga to Linux in '94, never having owned a Windows PC.
Posted: Wed Jan 04, 2023 9:01 Post subject: It is totally possible, and I did it it with pi and openwrt
lexridge wrote:
msoengineer wrote:
Nor are there any drivers supported in dd-wrt for usb to ethernet adapters AFAIK...so what you want to do is not possible.
How hard could it be to build kernel modules to support USB to Ethernet adaptors? This is actually a great idea, imo. The ASIX AX88179 chipset driver is already built into the mainstream kernel (one of many). I suppose it is removed in the DD-WRT kernel because of space limitations. Perhaps we could add a modules folder in /opt and insmod our own, when needed or desired. Would be a fantastic addition to DDWRT I think. What do you think about this?
EDIT: If I wanted to experiment with this, I assume the standard kernel headers (for a given version) and a cross-compile environment is all I would need?
There is a protocol called RNDIS that can make the router recognize a USB device as an ethernet adaptor. The micro USB port on Raspberry Pi Zero supports it. On the router side, you need to gain internet access to that ethernet interface (just like all other interfaces, for example: eth0). I run pihole this way with both my RT-N66U (runs Merlin) and an openwrt router. It is very likely that your Linux kernel comes with RNDIS support. If not, you can compile your own kernel.