- Apr. 13th, 2009
- 2 comments
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-184.108.40.206-d-r211.tar.bz2 @ Google Code). It should probably work for you as long as you're using a Broadcom-based router.
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
ABORT 'NO ANSWER'
SAY 'Starting Up…\n'
# Get the modem's attention and reset it.
# E0=No echo, V1=English result codes
# List signal quality
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
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
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
pppd file /jffs/isp-connect.ppp
iptables -A FORWARD -i br0 -o ppp0 -j ACCEPT
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
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!
"2 Wise Comments Banged Out Somewhere On The Internet ..."