Thought I'd better throw this info up given I got most of the info I needed to get this running from these forums.
Please bear in mind I'm new to open-wrt and linux and this most likely was the hard way around to getting this running!
The following is the 3g script I used, all working for the past few hours, I hope this helps someone out :)
#!/bin/sh
# ---------------------------------------------------------
# 3G Connection Script for WiFi Pineapple. "Does the thing"
#
# Version: 2012-02-17
# Supports:
#
# ZTE MF821 (Telstra australia 4g) -dkitchen
# Novatel MC760 (Virgin) -dkitchen
# Novatel MC760 (Ting) -dkitchen
#
# Updated: wifipineapple.com
# ---------------------------------------------------------
# -----------------------------------------------------------
# Configure /etc/ppp/options with hard-coded working settings
# -----------------------------------------------------------
echo "
logfile /dev/null
noaccomp
nopcomp
nocrtscts
lock
maxfail 0" > /etc/ppp/options
# --------------------------------------------------------------------------------------------------
# Check for known usb modem vendor and product IDs then switch 'em from storage to serial modem mode
# --------------------------------------------------------------------------------------------------
echo "Searching for attached 3G Modems"
logger "3G: Connection Script here, searching for modems"
MODEM=$(lsusb | awk '{ print $6 }')
echo $MODEM
case "$MODEM" in
*19d2:0257*)
echo "ZTE MF821 detected. starting"
uci delete network.wan2
uci set network.wan2=interface
uci set network.wan2.ifname=ppp0
uci set network.wan2.proto=3g
uci set network.wan2.service=umts
# Below line had to be changed to make this device work
uci set network.wan2.device=/dev/ttyUSB1
uci set network.wan2.apn=telstra.internet
uci set network.wan2.defaultroute=1
uci commit network
# switchmode not needed device is always in modem mode(19d2:0257)!
sleep 10; rmmod usbserial
sleep 5; insmod usbserial vendor=0x19d2 product=0x257
# sleep 5; /etc/init.d/firewall disable; /etc/init.d/firewall stop
# logger "3G: firewall stopped"
iptables -t nat -A POSTROUTING -s 172.16.42.0/24 -o 3g-wan2 -j MASQUERADE
iptables -A FORWARD -s 172.16.42.0/24 -o 3g-wan2 -j ACCEPT
iptables -A FORWARD -d 172.16.42.0/24 -m state --state ESTABLISHED,RELATED -i 3g-wan2 -j ACCEPT
;;
esac
Thanks
Rob