USB Tether to Router

Post new topic   This topic is locked: you cannot edit posts or make replies.    DD-WRT Forum Index -> General Questions
Author Message
zubbs1
DD-WRT Novice


Joined: 11 Jul 2017
Posts: 4

PostPosted: Tue Jul 11, 2017 3:45    Post subject: USB Tether to Router Reply with quote
Running Kong version dd-wrt.v24-K3_AC_ARM_STD.bin on an Asus RT68U router. Trying to tether phone via usb.

Tried following advice here (topic removed)


Quote:

Code:

nvram set wan_default=usb0
nvram set wan_iface=usb0
nvram set wan_ifname=usb0
nvram set wan_ifnames=usb0
nvram set wan_ifname2=usb0
nvram commit
reboot


The router reboots, so I assume it does its function.
Continuing on:
Quote:

Code:

insmod usbnet
insmod cdc_ether
udhcpc -i usb0

insmod: cannot insert '/lib/modules/4.4.70/usbnet.ko': File exists
insmod: cannot insert '/lib/modules/4.4.70/cdc_ether.ko': File exists
udhcpc: ioctl 0x8933 failed: No such device


The 'File exists' error is because I already executed this, so I know I can only do it once. However, the 'No such device' is worrisome. When I query ifconfig, there is no 'usb0' interface listed Shocked
Quote:

Code:

ifconfig

br0
Link encap:Ethernet HWaddr 2C:4D:54:48:B8:B8
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:31327 errors:0 dropped:65 overruns:0 frame:0
TX packets:35226 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2617118 (2.4 MiB) TX bytes:36844124 (35.1 MiB)


br0:0
Link encap:Ethernet HWaddr 2C:4D:54:48:B8:B8
inet addr:169.254.255.1 Bcast:169.254.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1


eth0
Link encap:Ethernet HWaddr 2C:4D:54:48:B8:B8
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:31333 errors:0 dropped:0 overruns:0 frame:0
TX packets:36254 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3308910 (3.1 MiB) TX bytes:37102100 (35.3 MiB)
Interrupt:179 Base address:0x4000


eth1
Link encap:Ethernet HWaddr 2C:4D:54:48:B8:BA
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:173718
TX packets:1015 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:128613 (125.5 KiB)
Interrupt:163


eth2
Link encap:Ethernet HWaddr 2C:4D:54:48:B8:BC
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:323
TX packets:1002 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:127076 (124.0 KiB)
Interrupt:169

lo
Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MULTICAST MTU:65536 Metric:1
RX packets:38 errors:0 dropped:0 overruns:0 frame:0
TX packets:38 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:2240 (2.1 KiB) TX bytes:2240 (2.1 KiB)


vlan1
Link encap:Ethernet HWaddr 2C:4D:54:48:B8:B8
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:31333 errors:0 dropped:0 overruns:0 frame:0
TX packets:35139 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2619584 (2.4 MiB) TX bytes:36726137 (35.0 MiB)


vlan2
Link encap:Ethernet HWaddr 2C:4D:54:48:B8:B8
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:1103 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:226891 (221.5 KiB)


When I plug in my usb, and turn on tether, I can see it listed, so I know the router sees it (the bold bus 001 device 004 is not listed when usb is not plugged into router):

Quote:

Code:

lsusb

Bus 001 Device 004: ID 05c6:9024
Bus 001 Device 001: ID 1d6b:0002
Bus 002 Device 001: ID 1d6b:0001
Bus 003 Device 001: ID 1d6b:0002
Bus 004 Device 001: ID 1d6b:0003
Bus 005 Device 001: ID 1d6b:0002


Anyone have any idea why the Wan interface isn't changing to usb0, or something I'm doing wrong?

Cheers.
Sponsor
zubbs1
DD-WRT Novice


Joined: 11 Jul 2017
Posts: 4

PostPosted: Tue Jul 11, 2017 16:49    Post subject: Reply with quote
I was able to confirm that the nvram_set wan commands are present:
Quote:

Code:

root@DD-WRT:~# nvram show |grep wan_

wan_unit=0
wan_get_dns=
size: 31479 bytes (34057 left)
wan_lease=0
wan_gateway=
wan_hwname=
wan_domain=
wan_netmask=
wan_ifname2=usb0
dr_wan_rx=0
wan_dns=
wan_proto=dhcp
wan_hwaddr=2C:4D:54:48:B8:B9
clone_wan_mac=0
wan_default=usb0
wan_ifnames=usb0

dr_wan_tx=0
l2tp_wan_gateway=0.0.0.0
wan_primary=1
wan_dial=0
wan_gateway_buf=0.0.0.0
wan_vdsl=0
wan_iface=usb0
upnp_wan_proto=
wan_ipaddr=
wan_wins=0.0.0.0
wan_mtu=1500
pptp_wan_gateway=0.0.0.0
wan_get_domain=
wan_ifname=usb0
wan_hostname=
ddns_wan_ip=1
wan_dualaccess=0


Is the intent of the nvram set wan_* function to create a new interface? I noticed that it doesn't matter what named interface I use, i.e. eth3, it still is not created when queried on ifconfig. I really want to understand how this works.

cheers.
gomfedj
DD-WRT Novice


Joined: 16 Sep 2013
Posts: 29

PostPosted: Tue Aug 29, 2017 2:20    Post subject: Reply with quote
Living through hurricane harvey here in houston and internet/phone/cable has gone down so i figured i would tackle tethering my samsung S8 via USB to my Asus RT-AC68r

had no idea what i was in for... however i did get it working and figured out your issue/problem..

first you need to do the NVRAM sets like you did, but i figured out only 2 are necessary

make sure to make a note of your OLD settings on those nvram parameters, mine were both vlan2 (do a 'nvram show |grep wan_' to make sure yours are also vlan2 or if they are something else)

nvram set wan_default=usb0
nvram set wan_ifname2=usb0
nvram commit
reboot

Then

insmod usbnet
insmod cdc_ether
insmod rndis_host (not positive it is necessary but worked for me)

then

ifconfig usb0 up (this is the step you needed i believe)
udhcpc -i usb0


finally that worked for me and got the house active on my samsung s8 via USB to the router...

i DID have to 'play' with the phone some doing "enable usb tether" a few times if 'udhcpc -i usb0' didn't get an address.. and sometimes 'ifconfig usb0 up' wouldn't work 1st or 2nd time but would 3rd...

i am suprised this is not 'plug and play' it seems like they have it setup/build in for iphones but not androids.. (dunno y)

hopefully this helps you and others, i am by no means an "expert" just good at googling Smile

Mod note 04.14.24: As of 55779 and later releases, Android USB Tethering is now included in DD-WRT for those routers which support it:

2024 - Android usb tethering to dd-wrt router?
Display posts from previous:    Page 1 of 1
Post new topic   This topic is locked: you cannot edit posts or make replies.    DD-WRT Forum Index -> General Questions 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 can attach files in this forum
You can download files in this forum