Foxtrot Posted May 11, 2013 Posted May 11, 2013 (edited) Hey guys, recently dug out a Huawei E353 Modem, plugs in and it can see networks (light blinks different colors to indicate), lsusb sees it as an E398, however it says E353 on the actual modem... So I cannot connect, i followed a few posts on here to no avail, I know im missing something... Please help me out :) FIXED! 3G Script : #!/bin/sh# ---------------------------------------------------------# 3G Connection Script for WiFi Pineapple. "Does the thing"## Version: 2012-02-17# Supports:## ZTE MF591 (T-Mobile) -dkitchen# Novatel MC760 (Virgin) -dkitchen# Novatel MC760 (Ting) -dkitchen# Sierra 598u (Ting) -brianzimm# And more.## Updates: wifipineapple.com# ---------------------------------------------------------# -----------------------------------------------------------# Configure /etc/ppp/options with hard-coded working settings# -----------------------------------------------------------echo "logfile /dev/nullnoaccompnopcompnocrtsctslockmaxfail 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 $MODEMcase "$MODEM" in*12d1:1506*) echo "Huawei E353"uci delete network.wan2uci set network.wan2=interfaceuci set network.wan2.ifname=ppp0uci set network.wan2.proto=3guci set network.wan2.service=umtsuci set network.wan2.device=/dev/ttyUSB0uci set network.wan2.apn=three.co.ukuci set network.wan2.username=uci set network.wan2.password=uci set network.wan2.defaultroute=1 NoDriverLoading=1uci commit networkusb_modeswitch -v 12d1 -p 1506 -V 12d1 -P 1506 -M 55534243123456780000000000000011062000000100000000000000000000 -n 1 -s 20sleep 10; rmmod usbserialsleep 3; insmod usbserial vendor=0x12d1 product=0x1506sleep 5; /etc/init.d/firewall disable; /etc/init.d/firewall stoplogger "3G: firewall stopped"iptables -t nat -A POSTROUTING -s 172.16.42.0/24 -o 3g-wan2 -j MASQUERADEiptables -A FORWARD -s 172.16.42.0/24 -o 3g-wan2 -j ACCEPTiptables -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:6002* | *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=0x1410 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 ;;*1199:0025*) echo "Sierra 598u (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 1199 -p 0025 sleep 10; rmmod usbserial sleep 3; insmod usbserial vendor=0x1199 product=0x0025 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 ;;*12d1:1436*) echo "Huawei E173 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=apn uci set network.wan2.username=username uci set network.wan2.password=password uci set network.wan2.defaultroute=1 uci commit network usb_modeswitch -v 12d1 -p 1436 sleep 10; rmmod usbserial sleep 3; insmod usbserial vendor=0x12d1 product=0x1436 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 ;;*12d1:140c*) echo "Huawei Modem (3-IRL) 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=3internet uci set network.wan2.username= uci set network.wan2.password= uci set network.wan2.defaultroute=1 uci commit network usb_modeswitch -v 12d1 -p 140c -V 12d1 -P 140c -M 5553424312345678000000000000061b000000020000000000000000000000 -n 1 -s 20 sleep 10; rmmod usbserial sleep 3; insmod usbserial vendor=0x12d1 product=0x140c 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 The above config now works with a Huawei E353 on 3 Mobile :) -Foxtrot Edited May 11, 2013 by Foxtrot Quote
Foxtrot Posted May 11, 2013 Author Posted May 11, 2013 (edited) Fixed! with the above config :) -Foxtrot Edited May 11, 2013 by Foxtrot Quote
hkbeejay Posted May 11, 2013 Posted May 11, 2013 Fixed! with the above config :) -Foxtrot Same script also works for Huawei E3131 on 3UK network Quote
Foxtrot Posted May 11, 2013 Author Posted May 11, 2013 Same script also works for Huawei E3131 on 3UK network Huh, neat :) -Foxtrot Quote
Munch Posted November 26, 2013 Posted November 26, 2013 will this script work with the Huawei E3131 t-mobile uk ? Quote
Foxtrot Posted November 26, 2013 Author Posted November 26, 2013 I don't see why it wouldnt, try it with tmobiles APN information. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.