Is it possible to turn USB port, into an Ethernet port?

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Author Message
NetworkFox83
DD-WRT Novice


Joined: 12 Dec 2018
Posts: 35

PostPosted: Mon Dec 28, 2020 4:07    Post subject: Is it possible to turn USB port, into an Ethernet port? Reply with quote
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 )
Sponsor
msoengineer
DD-WRT Guru


Joined: 21 Jan 2017
Posts: 1782
Location: Illinois Moderator

PostPosted: Mon Dec 28, 2020 4:32    Post subject: Reply with quote
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

TIPS/TRICKS: Best QCA Wifi Settings | Latency tricks | QoS Port priority | NEVER USE MU-MIMO |
Why to NOT use MU-MIMO | Max Wifi Pwr by Country | Linux Wifi Pwr | AC MCS & AX MCS | QCA 5Ghz chnls to use | WIFI Freq WIKI | TFTP R7800 | Don't buy AX | IPERF3 How-To

[R9000]52396 nightly (Main Router)
[EA8500]43192 & 45493 (2xOffsite)
[R7800] resting
[WDR3600]BS 44715 (Offsite)
[A7v5]BS 43038 (Offsite+spare napping)
cabbar
DD-WRT Novice


Joined: 26 May 2019
Posts: 1

PostPosted: Mon Dec 28, 2020 11:05    Post subject: Reply with quote
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.
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14125
Location: Texas, USA

PostPosted: Mon Dec 28, 2020 14:27    Post subject: Reply with quote
You could always add an external USB hub to the Pi and then add a USB ethernet dongle to the Pi as well.
_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
lexridge
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 960
Location: WV, USA

PostPosted: Tue Dec 29, 2020 2:10    Post subject: Reply with quote
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?

_________________
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.

Forum member #248
liuhan211211
DD-WRT Novice


Joined: 04 Jan 2023
Posts: 1

PostPosted: Wed Jan 04, 2023 9:01    Post subject: It is totally possible, and I did it it with pi and openwrt Reply with quote
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.
hebeda
DD-WRT User


Joined: 18 Sep 2006
Posts: 456
Location: Leipzig, Germany

PostPosted: Fri Jan 06, 2023 13:52    Post subject: Reply with quote
the x86 and x64 DD-WRT Builds support various USB to Ethernet Chipsets ....

ive used them myself for a while ...

i think it depends very much on the router and available memory to make it work on other devices than a x86/x64 CPU ...
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum