Apr 13

Howto: DD-WRT & Novatel Cellular USB Modem

Posted by Jaimie Sirovich on Apr. 13th, 2009. 2 comments — voice your opinion.

NEED A GREAT WEB SITE? NEED IT TO BE SEARCH-ENGINE-FRIENDLY?

SEO Egghead is a web development firm dedicated to creating custom, search engine optimized web site applications. We specialize in eCommerce and content management web sites that not only render information beautifully to the human, but also satisfy the "third browser" — the search engine. To us, search engines are people too. Click here to talk to us. We'd love to help!
X

A bit off-topic, but useful nonetheless. One day cable went down. Optimum online is usually great — but they totally dropped the ball that day. We wanted to use our Novatel Ovation U720 cellular modem to power our network as a backup. Lots of credit goes to Dragon, and this wiki. Here's how we did it:

Grab the modules we need; throw on JFFS

You need usbserial.o and option.o. You can get these here and here. Note: The ones at http://www.dd-wrt.com/phpBB2/viewtopic.php?t=43358 did not work for me. I got mine courtesy of Oleg's Asus wl500gP Linux build (modules-1.9.2.7-d-r211.tar.bz2 @ Google Code). It should probably work for you as long as you're using a Broadcom-based router.

Install chat

See http://www.dd-wrt.com/wiki/index.php/Ipkg. You just need to install chat so that we can send the right strings to the modem to connect. You might also want to install "microcom" to debug interactively. Cellular modems are just like analog modems of yesterday. Yep, ATZ. Yep, ATD. Same old strings Hayes invented for modems in the 70s.

Create a chat script; /jffs/isp-connect.chat

TIMEOUT 10
ABORT 'BUSY'
ABORT 'NO ANSWER'
ABORT 'ERROR'
SAY 'Starting Up…\n'
# Get the modem's attention and reset it.
"" 'ATZ'
# E0=No echo, V1=English result codes
OK 'ATE0V1′
# List signal quality
'OK' 'AT+CSQ'
'OK' 'ATDT#777′
CONNECT

Create a PPP script referencing that chat script; /jffs/isp-connect.ppp

/dev/usb/tts/0 # modem
921600 # faster than this has no effect, and actually can be detrimental
defaultroute # use cellular network for default route
usepeerdns # use the DNS servers from the remote network
#nodetach # keep pppd in the foreground
#debug
crtscts # hardware flow control
lock # lock the serial port
noauth # don't expect the modem to authenticate itself
local # don't use Carrier Detect or Data Terminal Ready
persist # Redial if connection lost
user
ppp
holdoff 5 # Reconnect after 5s on connection loss
lcp-echo-failure 4 # prevent timeouts
lcp-echo-interval 65535 # prevent timeouts
connect "/jffs/usr/sbin/chat -v -f /jffs/isp-connect.chat"

Load it all up in a script; /jffs/isp-connect.sh

#!/bin/sh
insmod /jffs/usbserial.o
insmod /jffs/option.o
pppd file /jffs/isp-connect.ppp
iptables -A FORWARD -i br0 -o ppp0 -j ACCEPT
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

Done!

If it doesn't work, set connection type to Disabled or DHCP before running the above script. This is not 100% automated/streamlined, but it works!

Tell an amigo:
  • Sphinn
  • Digg
  • Reddit
  • del.icio.us
  • StumbleUpon
  • Facebook



Related posts:
SSH2 & PHP Howto Guide: SSH Connections Made Easy in PHP PHP doesn't come with native support for making SSH connections...
Tell Your Competitors To Use Network Solutions' DNS Today I ordered my lunch online.  When I hit "confirm,"...




"2 Wise Comments Banged Out Somewhere On The Internet ..."


seoegghead (Jaimie Sirovich)

How to set up DDWRT with a cellular modem … http://tinyurl.com/cu6f6w

seomasterlist (seomasterlist)

Howto: DD-WRT & Novatel Cellular USB Modem: A bit off-topic, but useful nonetheless. One day cable went down. Op.. http://tinyurl.com/cu6f6w



Care To Bang On The Keys ... ?

BECOME AN EGGHEAD. SUBSCRIBE TO OUR RSS FEED!

Learn to be as nerdy as we are by never missing our latest blog entries. Receive great tips, tricks, and ideas on improving your web site every day! Subscribe via our RSS Feed or use the chicklets in the sidebar.