billius Posted April 8, 2012 Share Posted April 8, 2012 (edited) after much agony trying to get my Huawei modem to work with the pineapple, I managed it with a slightly unconventional approach. newer Huawei modems don't support usb modeswitch, but instead wait for the kernel to work out what it is and use the correct kernel module on it. the first step is to make sure that you have the serial interface enabled. you can check this by issuing: ls /dev/ttyUSB* if you get /dev/ttyUSB0 /dev/ttyUSB1 /dev/ttyUSB2 /dev/ttyUSB3 then your modem is currently in the correct mode; but if not, you need to insert the correct kernel module. first, find the ID of your USB modem by issuing lsusb and find your modem. for me, it was the fourth one. root@Pineapple:~/sslstrip-0.9# lsusb Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 0409:0059 NEC Corp. HighSpeed Hub Bus 001 Device 004: ID 0781:5170 SanDisk Corp. Bus 001 Device 007: ID 12d1:140c Huawei Technologies Co., Ltd. with the above, the vendor ID is 12d1 and the product is 140c. for the command to insert the correct module with these options, we need to issue insmod usbserial vendor=0x12d1 product=0x140c (note that we inserted "0x" before each section of the IDs) now we should have the serial interfaces in /dev/USB*. I completely gutted my configuration script in testing (which isn't the best idea; for a better solution read down to the next post to see what Whistle Master did) but my solution works reliably. it simply contains 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 ifup wan2 the pineapple needs to know what wan2 is, which we set above. I changed my /etc/config/network file to have: config interface wan2 option ifname ppp0 option device /dev/ttyUSB0 option apn yesinternet option service umts option proto 3g if you use multiple 3G cards and switch between them, you should simply add Whistle Master's section of script to the default one. note that you'll have to change that apn to be your carrier's; my apn is "yesinternet" because i'm using the prepaid mobile package provided by Optus in Australia. please note that it may take a large amount of tweaking to get this to work correctly for you. It's designed to be a starting point to work out how to configure a Huawei modem for the pineapple, and is almost guaranteed to fail for you because of differences with your 3G network provider. Edited April 8, 2012 by billius Quote Link to comment Share on other sites More sharing options...
Whistle Master Posted April 8, 2012 Share Posted April 8, 2012 Thanks for the info! We can share experience and knowledge about Huawei modems in this thread. I'm using a Huawei E173 for the MK4. I'm using the script provided by Seb and simply added the following lines: *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=<<CHANGE HERE YOUR APN>> uci set network.wan2.username=<<CHANGE HERE YOUR USERNAME>> uci set network.wan2.password=<<CHANGE HERE YOUR 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 ;; Quote Link to comment Share on other sites More sharing options...
kevambert Posted April 8, 2012 Share Posted April 8, 2012 (edited) This worked for me Huawei E160G 12d1:140c, however you cant use the 3g on boot option as the micro SD card needs to mount first, but adding the 3G connection script to whistle master's button module sorts that out :) /etc/usb_modeswitch.d /12d1:140c ( I renamed the 12d1:1003 file to 12d1:140c and edited it to) ######################################################## # Huawei E160G DefaultVendor= 0x12d1 DefaultProduct=0x140c TargetClass=0xff CheckSuccess=20 HuaweiMode=1 3G script *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 Fstab: config global automount option from_fstab 1 option anon_mount 1 config global autoswap option from_fstab 1 option anon_swap 1 config mount option target /usb option device /dev/sda option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0 config swap option device /dev/sda2 option enabled 1 Edited April 8, 2012 by kevambert Quote Link to comment Share on other sites More sharing options...
kevambert Posted April 8, 2012 Share Posted April 8, 2012 I fixed an error I made in posting the Fstab config I think I doubled pasted it in, Thanks billius for spotting that Quote Link to comment Share on other sites More sharing options...
Whistle Master Posted April 8, 2012 Share Posted April 8, 2012 (edited) I fixed an error I made in posting the Fstab config I think I doubled pasted it in, Thanks billius for spotting that Your fstab config states: config mount option target /usb option device /dev/sda option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0 but on your screenshot, disk usage doesn't show any /usb mounted. Instead, you have your first partition mounted on /mnt/sda1, do you know why? I ask this question because I also have a SD card inside my Huawei modem but I have to create two mount points in fstab: one for /dev/sda and another for /dev/sda1 to be able to mount the sdcard sda1 as /usb and then have sda2 for swap. I don't know why Edited April 8, 2012 by Whistle Master Quote Link to comment Share on other sites More sharing options...
kevambert Posted April 8, 2012 Share Posted April 8, 2012 (edited) I dont know whistle master I have just been using symbolic links to the sd card mnt/sda1, to be honest I didnt think of puttting another option in Fstab to mount it to /usb, but I will try it now Thanks for the tip :) Edited April 8, 2012 by kevambert Quote Link to comment Share on other sites More sharing options...
kevambert Posted April 8, 2012 Share Posted April 8, 2012 I have changed Fstab to config global automount option from_fstab 1 option anon_mount 1 config global autoswap option from_fstab 1 option anon_swap 1 config mount option target /usb option device /dev/sda option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0 config mount option target /usb option device /dev/sda1 option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0 config swap option device /dev/sda2 option enabled 1 Thanks whistle master its now mounted to /usb Quote Link to comment Share on other sites More sharing options...
Whistle Master Posted April 9, 2012 Share Posted April 9, 2012 (edited) I have changed Fstab to [...] Thanks whistle master its now mounted to /usb ;) However, what I do not understand is why we need to add two mount points, one for sda and another for sda1 Edited April 9, 2012 by Whistle Master Quote Link to comment Share on other sites More sharing options...
billius Posted April 9, 2012 Author Share Posted April 9, 2012 ;) However, what I do not understand is why we need to add two mount points, one for sda and another for sda1 it seems that mount has to query the 3g dongle for its partition layout before the kernel can see the partitions on the USB. This should happen automatically, but it may be a by-product of the usb modeswitch. Quote Link to comment Share on other sites More sharing options...
webdirector Posted April 9, 2012 Share Posted April 9, 2012 Hello, I am using a Huawei E353 brand new from Amazon it had all seal untouched. I am saying this as when I insert the 3G Modem and LSUSB I get: Bus 001 Device 003: ID 12d1:1506 Huawei Technologies Co., Ltd. E398 LTE/UMTS/GSM Modem/Networkcard So it is showing a E398 instead of the E353. Up until version 1.1.0 I had no issues using it with the pineapple. But now with version 1.1.1 It does not work anymore. This is what i was using: #!/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 # # 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 *12d1:1506*) echo "Huawei E353" 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=gprs.swisscom.ch uci set network.wan2.username= uci set network.wan2.password= uci set network.wan2.defaultroute=1 uci commit network usb_modeswitch -v 12d1 -p 1506 sleep 10; rmmod usbserial sleep 3; insmod usbserial vendor=0x12d1 product=0x1506 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 But now I do not get any connects anymore. I reflashed the Pineapple 2 times already. But that did not change anything. does anybody have an idea for me ? Thanks Quote Link to comment Share on other sites More sharing options...
billius Posted April 9, 2012 Author Share Posted April 9, 2012 (edited) Hello, I am using a Huawei E353 brand new from Amazon it had all seal untouched. I am saying this as when I insert the 3G Modem and LSUSB I get: Bus 001 Device 003: ID 12d1:1506 Huawei Technologies Co., Ltd. E398 LTE/UMTS/GSM Modem/Networkcard So it is showing a E398 instead of the E353. Up until version 1.1.0 I had no issues using it with the pineapple. But now with version 1.1.1 But now I do not get any connects anymore. I reflashed the Pineapple 2 times already. But that did not change anything. does anybody have an idea for me ? Thanks first of all, we need to check whether the serial interface is working. issue: ls /dev/ttyUSB* and you should get something like: /dev/ttyUSB0 /dev/ttyUSB1 /dev/ttyUSB2 /dev/ttyUSB3 the only other thing that I can think of is checking your APN is correct. some providers have different APNs for different methods of billing (prepaid vs. post paid) Edited April 9, 2012 by billius Quote Link to comment Share on other sites More sharing options...
webdirector Posted April 9, 2012 Share Posted April 9, 2012 (edited) Hello, When I do the ls /dev/ttyUSB* I get the : /dev/ttyUSB0 /dev/ttyUSB1 /dev/ttyUSB2 /dev/ttyUSB3 I am using o2 and the APN is "internet" Rgds Edited April 9, 2012 by webdirector Quote Link to comment Share on other sites More sharing options...
billius Posted April 9, 2012 Author Share Posted April 9, 2012 Hello, When I do the ls /dev/ttyUSB* I get the : /dev/ttyUSB0 /dev/ttyUSB1 /dev/ttyUSB2 /dev/ttyUSB3 I am using o2 and the APN is "internet" Rgds in the above script, the line that says uci set network.wan2.apn=gprs.swisscom.ch should be uci set network.wan2.apn=internet Quote Link to comment Share on other sites More sharing options...
webdirector Posted April 9, 2012 Share Posted April 9, 2012 in the above script, the line that says uci set network.wan2.apn=gprs.swisscom.ch should be uci set network.wan2.apn=internet yes I updated that ............. rebooted but it did not change anything not working Quote Link to comment Share on other sites More sharing options...
webdirector Posted April 9, 2012 Share Posted April 9, 2012 I was just looking under Darrens list and I found this for E353 I am just wondering witch product ID I should use ? the 0f01 or the 14db or a mix ? and also why is it when I do lsusb showing me the 1506 ? ####################################################### # Huawei E353 (3.se) # # Contributor: Ulf Eklund DefaultVendor= 0x12d1 DefaultProduct=0x1f01 TargetVendor= 0x12d1 TargetProduct= 0x14db MessageContent="55534243123456780000000000000a11062000000000000100000000000000" # Driver is cdc_ether NoDriverLoading=1 Quote Link to comment Share on other sites More sharing options...
webdirector Posted April 9, 2012 Share Posted April 9, 2012 I guess the issue is that the E398 are not supported as it is not in the list from Darren. I guess Amazon got me. As said I ordered the E353 ( it also says that on package )but the pineapple recongnize it as teh E398. So i Guess the lesson learned is not to buy the E353 I will buy a E173 as it seems to work for the others. Thanks Quote Link to comment Share on other sites More sharing options...
kevambert Posted April 9, 2012 Share Posted April 9, 2012 I guess the issue is that the E398 are not supported as it is not in the list from Darren. I guess Amazon got me. As said I ordered the E353 ( it also says that on package )but the pineapple recongnize it as teh E398. So i Guess the lesson learned is not to buy the E353 I will buy a E173 as it seems to work for the others. Thanks Before you buy another one you could try what I did for my Huawei E160G 12d1:140c There dosent seem to be a 12d1:1506 file in /etc/usb_modeswitch.d for your huawei (ID 12d1:1506) I found myself in the same situation with a huawei E160G id 12d1:140c, there wasn't a 12d1:140c file so I took the 12d1:1003 file and renamed it to 12d1:140c I then edited it like so, ######################################################## # Huawei E160G DefaultVendor= 0x12d1 DefaultProduct=0x140c TargetClass=0xff CheckSuccess=20 HuaweiMode=1 You could try the same, you could try renaming the file 12d1:1003 to 12d1:1506 and edit it like so ######################################################## # Huawei E220, E230, E270, E870 DefaultVendor= 0x12d1 DefaultProduct=0x1506 TargetClass=0xff CheckSuccess=20 HuaweiMode=1 its worth a try before you go and buy another one Quote Link to comment Share on other sites More sharing options...
kevambert Posted April 9, 2012 Share Posted April 9, 2012 (edited) Ok so I broke my Huawei E160G 12d1:140c 3G modem. I tried a solder repair but the thing gets really hot when its plugged into the pineapple or my laptop for that matter, I got another Huawei modem K3765 from a friend. it had an ID of 12d1:1465 so before I tried to set it up to work in the pineapple I decided to check for a firmware update for the modem first from This Link Here I got an update that changed the firmware from K3765 to E1762 it now has an ID of 12d1:140c which meant I didn't have to change a thing :) So if anyone is having trouble getting their Huawei modem set up it worth while checking for a firmware update first. Edited April 9, 2012 by kevambert Quote Link to comment Share on other sites More sharing options...
webdirector Posted April 10, 2012 Share Posted April 10, 2012 Hello Kavenbert, Thanks for the suggestion. I tried out what you suggested and tried several variation of it but with no luck But thanks for pointing this out Rgds Quote Link to comment Share on other sites More sharing options...
Thetra Posted April 11, 2012 Share Posted April 11, 2012 (edited) Oh Joy, Finally managed to get this to work on the Huawei E353, even dough it showed up as E398. I used the USB Mode_Switch for 12d1:1506, It runs smooth as silk, Thank you soo much guys for helping me sorting this out, By the way, Just so nobody does the same F"#¤% i did the first 2 hours of trying, DO NOT USE BATTERY POWER before you get it up and running, Damn rookie mistake from my side . Also double and triple check the APN settings, Google is your friend Edited April 11, 2012 by Thetra Quote Link to comment Share on other sites More sharing options...
Deathstormer Posted April 11, 2012 Share Posted April 11, 2012 Hey Guys, I know i've missed something quite simple. Trying to get a Huawei E1750/E169 3G Modem to work. (12d1:1001) 3G script code below. *12d1:1001*) echo "Huawei E1750 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=live.vodafone.com uci set network.wan2.username= uci set network.wan2.password= uci set network.wan2.defaultroute=1 usb_modeswitch -v 12d1 -p 1001 uci commit network sleep 10; rmmod usbserial sleep 3; insmod usbserial vendor=0x12d1 product=0x1001 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 Checking the logs comes up with. usb-modeswitch: 1-1:1.4: Manufacturer=HUAWEI_Technology Product=HUAWEI_Mobile Serial=? 1-1:1.4: Selecting /etc/usb_modeswitch.d/12d1:1001 for mode switching usb-modeswitch: switching seemingly failed do i need to modify something in the fstab? Quote Link to comment Share on other sites More sharing options...
Vulture Posted April 11, 2012 Share Posted April 11, 2012 Hey Guys, I know i've missed something quite simple. Trying to get a Huawei E1750/E169 3G Modem to work. (12d1:1001) 3G script code below. *12d1:1001*) echo "Huawei E1750 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=live.vodafone.com uci set network.wan2.username= uci set network.wan2.password= uci set network.wan2.defaultroute=1 usb_modeswitch -v 12d1 -p 1001 uci commit network sleep 10; rmmod usbserial sleep 3; insmod usbserial vendor=0x12d1 product=0x1001 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 Checking the logs comes up with. usb-modeswitch: 1-1:1.4: Manufacturer=HUAWEI_Technology Product=HUAWEI_Mobile Serial=? 1-1:1.4: Selecting /etc/usb_modeswitch.d/12d1:1001 for mode switching usb-modeswitch: switching seemingly failed do i need to modify something in the fstab? Death stormer, can you run the following from SSH and provide the outputs? lsusb /www/pineapple/3g/3g.sh ls /dev/ttyUSB* logread (only the info about the connection) Quote Link to comment Share on other sites More sharing options...
Deathstormer Posted April 11, 2012 Share Posted April 11, 2012 lsusb Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 057: ID 12d1:1001 Huawei Technologies Co., Ltd. E169/E620/E800 HSDPA Modem /www/pineapple/3g/3g.sh #!/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 # # 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 *12d1:1001*) 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=live.vodafone.com uci set network.wan2.username= uci set network.wan2.password= uci set network.wan2.defaultroute=1 uci commit network usb_modeswitch -v 12d1 -p 1001 sleep 10; rmmod usbserial sleep 3; insmod usbserial vendor=0x12d1 product=0x1001 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 logread Jan 1 03:00:45 Pineapple user.notice usb-modeswitch: 1-1:1.4: Manufacturer=HUAW EI_Technology Product=HUAWEI_Mobile Serial=? Jan 1 03:00:45 Pineapple user.notice usb-modeswitch: 1-1:1.4: Selecting /etc/us b_modeswitch.d/12d1:1001 for mode switching Jan 1 03:00:45 Pineapple user.notice usb-modeswitch: switching seemingly failed Jan 1 03:00:45 Pineapple user.notice usb-modeswitch: switching seemingly failed Jan 1 03:00:45 Pineapple user.notice usb-modeswitch: switching seemingly failed Jan 1 03:00:45 Pineapple user.notice usb-modeswitch: switching seemingly failed Jan 1 03:00:45 Pineapple user.notice usb-modeswitch: switching seemingly failed Jan 1 03:00:45 Pineapple user.notice usb-modeswitch: switching seemingly failed Jan 1 03:00:45 Pineapple user.notice usb-modeswitch: switching seemingly failed Jan 1 03:01:04 Pineapple user.notice root: 3G: Connection Script here, searchin g for modems ls /dev/ttyUSB* = No such file or directory Quote Link to comment Share on other sites More sharing options...
Vulture Posted April 11, 2012 Share Posted April 11, 2012 Deathstormer, can you execute the 3G script? It almost looks like it isn't detecting your device as one of the modem choices, notice nothing in your logs after the searching for modem part. Looking online the modswitch errrr may not be an issue. Quote Link to comment Share on other sites More sharing options...
Deathstormer Posted April 11, 2012 Share Posted April 11, 2012 if i execute the script nothing happens. (nothing in the logs either) however if i run the following manually. i seem to get a 3g connection however unable to ping any address. 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=live.vodafone.com uci set network.wan2.username= uci set network.wan2.password= uci set network.wan2.defaultroute=1 uci commit network usb_modeswitch -v 12d1 -p 1001 sleep 10; rmmod usbserial sleep 3; insmod usbserial vendor=0x12d1 product=0x1001 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 Quote Link to comment Share on other sites More sharing options...
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.