Razzlerock Posted October 24, 2012 Share Posted October 24, 2012 Hi guys... Well, I thought life was going well with my beloved pineapple until I experienced an issue today Basically, I have the pineapple connect to a USB hub and the hub connects to a 3g dongle and a USB sandisk. Nothing special. The pineapple is configured to start 3g on boot and 3g keepalive. In addition, ssh on boot, ssh keepalive is also setup. I basically want my pineapple to autossh 'home' using 3g on boot up. If, for some reason, the 3g dies it should restart it....and if the ssh tunnel dies it should re-attempt a new tunnel. This works, on boot up. However, after about 1-2 hours I lose connectivity over ssh. Investigation shows that the 3g is 'down' and it cannot restart itself. I have to power cycle the pineapple but then 1-2 hours later the same thing happens. The 3g dongle has a blue lit display, which indicates it is connected, but there is no IP address assigned on the pineapple??? Pineapple Hardware Version: Mark IV Pineapple Software Version: 2.7.0 OS used to connect to the pineapple: Firefox All the tools/options that are running on the pineapple when the issue happened: 3g/autossh/karma Ping results from computer to pineapple: Is the problem repeatable (Yes/No): Yes, the problem does re-occur but the time interval varie When I tried to manually invoke the 3g-keepalive script I get; root@Pineapple:~# /pineapple/3g/3g-keepalive.sh ifconfig: 3g-wan2: error fetching interface information: Device not found Searching for attached 3G Modems 1d6b:0002 05e3:0606 0781:5571 12d1:1506 Huawei E398 detected. Attempting mode switch Looking for default devices ... found matching product ID adding device Found device in default mode, class or configuration (1) Accessing device 004 on bus 001 ... Getting the current device configuration ... OK, got current device configuration (1) Using first interface: 0x00 Using endpoints 0x01 (out) and 0x82 (in) Not a storage device, skipping SCSI inquiry USB description data (for identification) ------------------------- Manufacturer: Huawei Technologies Product: HUAWEI Mobile Serial No.: not provided ------------------------- Warning: no switching method given. -> Run lsusb to note any changes. Bye. rmmod: can't unload 'usbserial': Resource temporarily unavailable insmod: can't insert 'usbserial': File exists /pineapple/3g/3g.sh: line 59: /etc/init.d/firewall: not found /pineapple/3g/3g.sh: line 59: /etc/init.d/firewall: not found root@Pineapple:~# When I try to manually start the 3g-connect script I get; root@Pineapple:~# /pineapple/3g/3g.sh Searching for attached 3G Modems 1d6b:0002 05e3:0606 0781:5571 12d1:1506 Huawei E398 detected. Attempting mode switch Looking for default devices ... found matching product ID adding device Found device in default mode, class or configuration (1) Accessing device 004 on bus 001 ... Getting the current device configuration ... OK, got current device configuration (1) Using first interface: 0x00 Using endpoints 0x01 (out) and 0x82 (in) Not a storage device, skipping SCSI inquiry USB description data (for identification) ------------------------- Manufacturer: Huawei Technologies Product: HUAWEI Mobile Serial No.: not provided ------------------------- Warning: no switching method given. -> Run lsusb to note any changes. Bye. rmmod: can't unload 'usbserial': Resource temporarily unavailable insmod: can't insert 'usbserial': File exists /pineapple/3g/3g.sh: line 59: /etc/init.d/firewall: not found /pineapple/3g/3g.sh: line 59: /etc/init.d/firewall: not found root@Pineapple:~# Any ideas? Razzlerock Quote Link to comment Share on other sites More sharing options...
Razzlerock Posted October 24, 2012 Author Share Posted October 24, 2012 BTW, its fairly obvious about the missing /etc/init.d/firewall but what changes are required to get it working? Razzlerock Quote Link to comment Share on other sites More sharing options...
Razzlerock Posted October 24, 2012 Author Share Posted October 24, 2012 Apologies for replies to my own post.... but did the 3g script change from v2.5 to V2.7? I re-used the 3g script (below) that was working on v2.5. If someone has the 'default' 3g script for v2.7 please post it (I don't want to re-flash just to find out the default 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/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 E398 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=telstra.internet 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 Quote Link to comment Share on other sites More sharing options...
Sebkinne Posted October 24, 2012 Share Posted October 24, 2012 I am on the go and will expand this reply a bit more later but this is where you can get the 2.7.0 config: https://github.com/sebkinne/wifipineapple/blob/master/3g/3g.sh 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.