4G USB Modem

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2, 3  Next
Author Message
matt300
DD-WRT Novice


Joined: 08 Mar 2011
Posts: 8

PostPosted: Tue Apr 03, 2012 13:41    Post subject: Reply with quote
x64Jimbo wrote:
2) YouTube videos will sometimes buffer part of the way, then stop buffering until I manually advance the progress slider to the next "section" and then it happily buffers that section before hanging again.


I noticed this exact same behavior when connected through the router as well. My feeling is these issues may be resolved if we can figure out how to set this up in regular router mode instead of switch mode. I'm not sure where to start on that. All my other devices that connect through the router are working great: Slingbox, Tivo, VOIP phone. I've just been leaving the iSpot's wifi on and connect the laptop directly to it to get around those annoying website hangs, but you're right about the range being too short. It'd be great if someone could figure this out!

_________________
Asus RT-N16
DD-WRT v24-sp2 (10/26/10) mega
SVN revision 15508
Sponsor
x64Jimbo
DD-WRT Novice


Joined: 03 Apr 2012
Posts: 3

PostPosted: Tue Apr 03, 2012 19:14    Post subject: Reply with quote
Maybe you could help me understand something: You said it might have something to do with having the router in "switch mode." What do you mean by that, exactly? Is that when you turn the DHCP server off and allow the modem to assign the network's IP addresses, or something more complex?

My modem is currently the only DHCP server on my network, and the router is set up to pass traffic through... But I bet I could put the modem and my LAN on separate subnets to keep the DHCP servers from interfering with one another. Think that would change anything?
matt300
DD-WRT Novice


Joined: 08 Mar 2011
Posts: 8

PostPosted: Wed Apr 04, 2012 4:46    Post subject: Reply with quote
x64Jimbo wrote:
Maybe you could help me understand something: You said it might have something to do with having the router in "switch mode." What do you mean by that, exactly?


Look at post 2 in this thread:

hanskloss wrote:
Part 2
Setting-up Internet Connection

Once USB dongle is recognized is time to make it default internet connection.
First, please follow wiki guide how to change router into "switch"
http://www.dd-wrt.com/wiki/index.php/Switch



The wiki explains what the router does in switch mode better than I can. Basically, the USB modem is handing out IP's and the router is just sharing the internet connection with all connected devices in this setup. My hunch is packets are getting lost this way, but I'm not sure because everything except the computer that is connected to my router is working fine.

x64Jimbo wrote:
But I bet I could put the modem and my LAN on separate subnets to keep the DHCP servers from interfering with one another. Think that would change anything?


I tried this and it really didn't help. I have a second router, a Linksys on another subnet, connected to the Asus...same issues with hanging websites/youtube videos etc.

_________________
Asus RT-N16
DD-WRT v24-sp2 (10/26/10) mega
SVN revision 15508
calimansi
DD-WRT Novice


Joined: 04 Apr 2012
Posts: 2

PostPosted: Wed Apr 04, 2012 16:31    Post subject: Hello Reply with quote
I did something a little different on my tomato router; it may work a little different on dd-wrt.

Basically, I have my router acting as a router. The router requests an ip address from the clearspot, then uses ip masquerading to hand out ip's to the computers / devices behind the router. Everything goes to clearspot through the 1 ip address.

Here's how I did it:

I have the following 3 ko's on a jffs partition of my router; mii.ko, usbnet.ko and cdc_ether.ko.

I run the following script to get internet as described above:

insmod mii.ko
insmod usbnet.ko
insmod cdc_ether.ko
ifconfig usb0 up
udhcpc -i usb0
route add default gw 192.168.0.1 usb0
ifconfig usb0 192.168.0.10 netmask 255.255.255.0 broadcast 192.168.0.255
iptables --table nat --append POSTROUTING --out-interface usb0 -j MASQUERADE
iptables --append FORWARD --in-interface br0 -j ACCEPT

The script definitely needs to be tweaked and I need to figure out a way to get this to be automatic. I haven't experienced any sites timing out or anything.

Let me know if you guys can get this to work.

Thanks.
x64Jimbo
DD-WRT Novice


Joined: 03 Apr 2012
Posts: 3

PostPosted: Mon Apr 09, 2012 10:33    Post subject: Reply with quote
Very interesting, calimansi. Would you mind attaching the kernel modules that you used, so I can give it a shot?

Incidentally, I'm not sure how Tomato routers work, but DD-WRT has a feature where you can store a list of commands in plain text right from the admin page, and the router will execute them as a shell script whenever it powers on. You might try looking around for a similar feature in your firmware, or failing that, you could always just drop those commands into an init script, old-school Linux style Wink
nevezen
DD-WRT Novice


Joined: 18 Apr 2012
Posts: 2

PostPosted: Thu Apr 19, 2012 0:37    Post subject: Reply with quote
I'd like those kernel modules as well.

I'm currently trying to get a CLEAR 4G stick to work on my Linksys E3000. I've done all the steps up to ifconfig but usb0 doesn't initialize or load. Maybe it doesn't recognize this specific device?

On a related note, where did you get the rndis kernel modules from?
wabe
DD-WRT Guru


Joined: 17 Jun 2006
Posts: 740

PostPosted: Wed Apr 25, 2012 14:47    Post subject: Reply with quote
I can recommend Kong Mod to achieve this. Works right out of the box, at leastt for me. I recently lost my wired internet connection and used a 3G dongle as backup. The only thing I did was to plug in the dongle, select '3G/4G' as Wan connection and filled in the APN. Everything worked directly, no additional modules to load. Success or failure is of course dependent on the dongle being supported.
muerte33
DD-WRT Novice


Joined: 28 Nov 2007
Posts: 34

PostPosted: Thu Apr 26, 2012 1:50    Post subject: Reply with quote
matt300 wrote:
I've been using this setup for a year now. It's been quite reliable...more than my cable modem used to be.
1. The Asus RT-N16 keeps the iSpot charged via USB...no splitter needed.
2. All the Lan ports can be used on your router. Initially, I had some trouble getting my Slingbox to work plugged directly into the Asus because it is used as a switch instead of a router. So I connected a Linksys router to one of the Asus Lan ports and then connected all devices to that: Slingbox, Tivo, VOIP phone, laptop.

The only issue I've had with this setup is the occasional "hang" on loading of some websites. I've wanted to try to get this working with the Asus in regular router mode instead of switch mode...just haven't gotten around to attempting it. For now, when I have trouble loading a certain site I just connect to the iSpot's wifi signal directly and the site loads fine.

Good Luck!




Try changing your MTUsize on the pc attached to the router.
1428 seems to work good, see the post by Upgraydd
http://www.droidforums.net/forum/droid-razr-support/184816-secure-sites-not-available-tethering-via-hotspot-usb.html
calimansi
DD-WRT Novice


Joined: 04 Apr 2012
Posts: 2

PostPosted: Mon Apr 30, 2012 10:36    Post subject: Reply with quote
nevezen wrote:
I'd like those kernel modules as well.

I'm currently trying to get a CLEAR 4G stick to work on my Linksys E3000. I've done all the steps up to ifconfig but usb0 doesn't initialize or load. Maybe it doesn't recognize this specific device?

On a related note, where did you get the rndis kernel modules from?


The modules can be found in the download section, under "Optional kernel modules." This will be a download for your respective version of tomatousb.

Hope this helps!
avagyan
DD-WRT Novice


Joined: 21 Nov 2011
Posts: 7

PostPosted: Mon Feb 11, 2013 15:56    Post subject: Reply with quote
So is there a way for Clear Spot w/ RNDIS currently?
http://www.dd-wrt.com/phpBB2/viewtopic.php?p=739033
matt300
DD-WRT Novice


Joined: 08 Mar 2011
Posts: 8

PostPosted: Wed Jul 31, 2013 21:32    Post subject: Re: Hello Reply with quote
calimansi wrote:
I did something a little different on my tomato router; it may work a little different on dd-wrt.

Basically, I have my router acting as a router. The router requests an ip address from the clearspot, then uses ip masquerading to hand out ip's to the computers / devices behind the router. Everything goes to clearspot through the 1 ip address.

Here's how I did it:

I have the following 3 ko's on a jffs partition of my router; mii.ko, usbnet.ko and cdc_ether.ko.

I run the following script to get internet as described above:

insmod mii.ko
insmod usbnet.ko
insmod cdc_ether.ko
ifconfig usb0 up
udhcpc -i usb0
route add default gw 192.168.0.1 usb0
ifconfig usb0 192.168.0.10 netmask 255.255.255.0 broadcast 192.168.0.255
iptables --table nat --append POSTROUTING --out-interface usb0 -j MASQUERADE
iptables --append FORWARD --in-interface br0 -j ACCEPT

The script definitely needs to be tweaked and I need to figure out a way to get this to be automatic. I haven't experienced any sites timing out or anything.

Let me know if you guys can get this to work.

Thanks.


Calimansi, can you tell me which version of Tomato you are using? For fun today, I tried the latest version but have not gotten this to work. I also tried KingKong mod but had no luck.

Did you figure out how to make the changes permanent?

Anyone else had success with the Clearspot or iSpot paired to a router? Lately, I've just been using internet connection sharing from the iSpot through Ubuuntu to my router. It's a smoother connection than my original setup with the Asus RT-N16 but still not ideal.

_________________
Asus RT-N16
DD-WRT v24-sp2 (10/26/10) mega
SVN revision 15508
MountainX
DD-WRT Novice


Joined: 28 Dec 2013
Posts: 42

PostPosted: Sat Aug 29, 2015 18:10    Post subject: 2015 update? Reply with quote
I've got a Buffalo router with DD-WRT firmware v24SP2-(08/12/14) std. My phone provider is T-Mobile and my plan includes tethering. My phone easily tethers to my PC via usb (without any 3rd party apps needed).

I want to get usb tethering working with my dd-wrt router. However, I am not finding any recent threads and I hesitate to follow information from 2011/2012.

How do I proceed? Thanks in advance.
shenoyh
DD-WRT Novice


Joined: 14 Feb 2011
Posts: 11

PostPosted: Fri Oct 20, 2017 16:39    Post subject: 2017 Update: Got it working Reply with quote
Its 2017: Several Years have passed since the original question of how to tether Android phones to DDWRT.

A couple years have also passed since MountainX went around asking about the same to several forums and threads and he was only successful in getting pointers to OLD DDWRT Wikis and threads. The DDWRT Wiki on this is outdated and does not apply to newer K3 builds that include several of the required drivers as well as built in support for things like ACM, 3G/4G modems, RNDIS.

It appears that MountainX did get this setup working based on what he has posted on an other website though we are not sure how he did it.

While it may be that DDWRT supports it, there is no Wiki article or even a forum post that details how to do this in clear steps (Android USB tethering in general which is different from using a 3G USB dongle).

After several hours searching, I finally got it working. If I had Wiki access, I could have put this in the Wiki, but unfortunately I do not have Wiki access.

Note that during the process I also found that this won't work on TPLink or other Atheros WiSOC routers - works only on ARM and maybe MIPS.

This is my router model and firmware (TMo router on Latest KONG):
Router ModelAsus RT-AC68U
Firmware Version DD-WRT v3.0-r33435M kongac (10/08/17)

Samsung Android phone connected by USB to USB2.0 port or router (though that should not matter and the 3.0 port should work well).

On the phone, I go into settings->Tethering and Hotspot-> Check the "USB Tethering" box. In order to see this box, your phone must be connected by USB to the router and may initially need to be in Data (LTE/3G mode) though you can later switch to Wifi if required.
My phone is rooted, but that should not matter so long as you see the USB tethering option.

The following will work both to share the Wifi from the phone as well as the LTE/3G:
cd /lib/modules/4.4.89
insmod usbnet.ko
insmod cdc_ether.ko
insmod rndis_host.ko
ifconfig usb0 up
udhcpc -i usb0

What it does is bring up the usb0 interface and get it an IP address which now becomes the WAN address of the router. Note that I have selected Connection Type as "Automatic Configuration - DHCP". It appears that DDWRT automatically assigns the usb0 to the WAN VLAN and so there is no need to update nvram parameters.
Credit to calamari who first did something like this on a tomato in 2012.(https://dd-wrt.com/phpBB2/viewtopic.php?t=79336&postdays=0&postorder=asc&start=15)
To makes things complete you do need to open the firewall as well to forward packets between the USB0 and the br0 which is the gateway (192.168.1.1) for your network with these firewall rules:
iptables --table nat --append POSTROUTING --out-interface usb0 -j MASQUERADE
iptables --append FORWARD --in-interface br0 -j ACCEPT

When you switch between Wifi and LTE/3G data on the phone, you may have to run (ifconfig usb0 up;
udhcpc -i usb0) each time since it loses the DHCP IP and does not automatically ask for it again.

So whats the use of this several may ask. Why not use Wifi tethering and put DDWRT in bridge mode? The answer is that not everyone does everything the same way and there are many different applications.

My goal now is to do a failover to the phone's LTE/3G only when required though its WiFi will still be active all the time. I will use an old cheap phone and I am getting a cheap data plan either an iOT data plan from AT&T or an PAYG Sprint plan that does not require monthly payment.
My security system consisting of several Wireless IP devices connect to one DDWRT router which is the security hub. This router sits on a location that does not have cable based internet access. So I have to use the phone's Wifi radio for the purpose of obtaining internet access from the distant router that has only 2.4GHz radio and I have no control of this main router. Several of my devices are not 5GHz capable and so I cannot use the 5GHZ radio at all.

So in my situation, I would use the phone's Wifi to connect to the distant router over Wifi most of the time. If that router/Wifi fails for some reason, then my phone would switch to LTE data.
While failover routing would have been best to do on the DDWRT router than on the phone, there is not sufficient information about failovers on DDWRT either...(failover from client mode to the USB tether or cabled WAN port ethernet is what I hope to get DDWRT to do in the future). So I am just using Androids build in failover mechanism at this time.
jagster936
DD-WRT Novice


Joined: 17 Apr 2018
Posts: 36

PostPosted: Wed Apr 18, 2018 2:48    Post subject: Reply with quote
Has anyone gotten this to work? There is a "mobile broadband" option for USB tethering, but I haven't been able to get it to work
sydlexia
DD-WRT Novice


Joined: 18 Feb 2014
Posts: 9
Location: San Francisco CA.

PostPosted: Wed May 16, 2018 19:21    Post subject: Reply with quote
jagster936 wrote:
Has anyone gotten this to work? There is a "mobile broadband" option for USB tethering, but I haven't been able to get it to work


Yes indeed. Tethering DD-WRT v3.0-r35030M kongac on a Netgear R7000 via a Galaxy S9+ using the method mentioned by shenoyh works well.

Phone connected to usb3 port; usb tethering enabled
WAN port on the router set to DHCP
ssh or telnet to router

run the following or put in rc.startup
Code:

cd /lib/modules/4.4.116-rc1  # this dir may be different
insmod usbnet.ko # this module should already be loaded
insmod cdc_ether.ko
insmod rndis_host.ko
ifconfig usb0 up
udhcpc -i usb0
iptables --table nat --append POSTROUTING --out-interface usb0 -j MASQUERADE
iptables --append FORWARD --in-interface br0 -j ACCEPT


That should do it. My phone will drop the port if no activity for a time, so a ping script running from cron that hits your gateway every minute or so will help to keep your connection stable. Just be sure to have your script chuck it's PID in a lock file of sorts and check for it's existence at each runtime to be sure you don't end up with 100 copies of the same script running.

As mentioned by shenoyh, you will likely have to re-run:

Code:

ifconfig usb0 up
udhcpc -i usb0


if your link drops to renew your dhcp lease. Assigning a static IP to usb0 my be an alternative solution to deal with that. Thanks to shenoyh for posting the details.
Goto page Previous  1, 2, 3  Next Display posts from previous:    Page 2 of 3
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC 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 can attach files in this forum
You can download files in this forum