Jump to content

How To Add At&t 3g Modem


surbo
 Share

Recommended Posts

Here is my config to add a US AT&T 3g Modem. You can use this as a guide.

Just swap out the 6 options below listed in my config.

Example: 1199 68a3

Put in your carriers apn

Example: uci set network.wan2.apn=wap.cingular

I hope this helps

#!/bin/sh

# ---------------------------------------------------------

# 3G Connection Script for WiFi Pineapple. "Does the thing"

#

# Version: 2012-02-17

# Supports:

#

# Sierra USB 308 -SuRb0

# ZTE MF591 (T-Mobile) -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

*1199:68a3*) echo "Sierra USB 308"

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

uci set network.wan2.device=/dev/ttyUSB0

uci set network.wan2.apn=wap.cingular

uci set network.wan2.username=

uci set network.wan2.password=

uci set network.wan2.defaultroute=1

uci commit network

usb_modeswitch -v 1199 -p 68a3

sleep 10; rmmod usbserial

sleep 3; insmod usbserial vendor=0x1199 product=0x68a3

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

;;

*19d2:1523*) echo "ZTE MF591 (T-Mobile) detected. Attempting mode switch"

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

uci set network.wan2.device=/dev/ttyUSB0

uci set network.wan2.apn=epc.tmobile.com

uci set network.wan2.username=internet

uci set network.wan2.password=internet

uci set network.wan2.defaultroute=1

uci commit network

usb_modeswitch -v 19d2 -p 1523 -V 19d2 -P 1525 -M

5553424312345678000000000000061b000000020000000000000000000000 -n 1 -s 20

sleep 10; rmmod usbserial

sleep 3; insmod usbserial vendor=0x19d2 product=0x1525

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

;;

*1410:5031*) echo "Novatel MC760 (Virgin Mobile) detected. Attempting mode switch"

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=cdma

uci set network.wan2.device=/dev/ttyUSB0

uci set network.wan2.username=internet

uci set network.wan2.password=internet

uci set network.wan2.defaultroute=1

uci set network.wan2.ppp_redial=persist

uci set network.wan2.peerdns=0

uci set network.wan2.dns=8.8.8.8

uci set network.wan2.keepalive=1

uci set network.wan2.pppd_options=debug

uci set network.wan2.pppd_options=noauth

uci commit network

usb_modeswitch -v 1410 -p 5031 -V 1410 -P 6002 -M

5553424312345678000000000000061b000000020000000000000000000000 -n 1 -s 20

sleep 10; rmmod usbserial

sleep 3; insmod usbserial vendor=-x1410 product=0x6002

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

;;

*1410:5030*) echo "Novatel MC760 (Ting) detected. Attempting mode switch"

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=cdma

uci set network.wan2.device=/dev/ttyUSB0

uci set network.wan2.username=internet

uci set network.wan2.password=internet

uci set network.wan2.defaultroute=1

uci set network.wan2.ppp_redial=persist

uci set network.wan2.peerdns=0

uci set network.wan2.dns=8.8.8.8

uci set network.wan2.keepalive=1

uci set network.wan2.pppd_options=debug

uci set network.wan2.pppd_options=noauth

uci commit network

usb_modeswitch -v 1410 -p 5030 -V 1410 -P 6000 -M

5553424312345678000000000000061b000000020000000000000000000000 -n 1 -s 20

sleep 10; rmmod usbserial

sleep 3; insmod usbserial vendor=0x1410 product=0x6000

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...