Jump to content

Huawei Modems With A Pineapple Iv


billius

Recommended Posts

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

After you ran it manually did you see anything in the logs about a connection? If you ls /dev/ttyUSB* do you get anything in return? Also, please verify that your lsusb is not showing a different value than "12d1:1001" for the modem. I have seen them change product codes occasionally depending on the device being removed and re-inserted.

Also, when you ran the 3g.sh script manually it should have at least said searching for modem, then printed the "12d1:1001" string, or perhaps something else was printed?

Link to comment
Share on other sites

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

Hello Thetra,

Can you plase post what you put into the usb_modeswitch and what your 3g script is?

I have the same modem but i can not get it to work.

Thanks

Edited by webdirector
Link to comment
Share on other sites

Hello Thetra,

Can you plase post what you put into the usb_modeswitch and what your 3g script is?

I have the same modem but i can not get it to work.

Thanks

Hi webdirector

I used the 12d1:1506 Worked as a charm, JUST be sure you are not on battery power I am currently using a bit overpower, At 12V 2A. and have done so successfully for as long as i had the Apple

Edited by Thetra
Link to comment
Share on other sites

Hi webdirector

I used the 12d1:1506 Worked as a charm, JUST be sure you are not on battery power I am currently using a bit overpower, At 12V 2A. and have done so successfully for as long as i had the Apple

that shouldn't be an issue. the device is designed for 12v; making 2A available is no worse than having 12v 10A. it's the voltage you have to worry about. if you go significantly higher or lower, you'll start getting problems, but with your setup it should be fine.

Link to comment
Share on other sites

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.

can you tell me what the purpose or the usb modeswitch file is for ?

the reason I ask is because sometime I get errors in the log files sometimes I don't saying usb modeswitch failed, so I removed the file from /etc/usb_modeswitch and removed the line from the 3g script.

However the Huawei modem id (12d1:140c) still works fine and the sd card inside is working fine as well, but now I dont get the error at all of usb modeswitch seemingly failed.

do I actually need the modeswitch file ?

Thanks

Link to comment
Share on other sites

can you tell me what the purpose or the usb modeswitch file is for ?

the reason I ask is because sometime I get errors in the log files sometimes I don't saying usb modeswitch failed, so I removed the file from /etc/usb_modeswitch and removed the line from the 3g script.

However the Huawei modem id (12d1:140c) still works fine and the sd card inside is working fine as well, but now I dont get the error at all of usb modeswitch seemingly failed.

do I actually need the modeswitch file ?

Thanks

Have you restarted the pineapple since you make that change? I ask because that application sets the vendor and product of the USB Modem.

Link to comment
Share on other sites

Yes Vulture

I have restarted several times is still works fine, the funny thing is when I made changes (wrong ones) to the file before removing it, the modem would not be recognised by the pineapple, the usb light would come on as if it detected it but then go off as if it lost connection.

Link to comment
Share on other sites

Still no luck with getting my 3G to work.

3G script below makes a successful connection, i get an IP, however i'm unable to ping anything i.e 8.8.8.8

Log Below.

Jan 1 00:01:15 Pineapple user.notice root: 3G: Connection Script here, searching for modems

Jan 1 00:01:27 Pineapple kern.info kernel: [ 87.810000] usbcore: deregistering interface driver usbserial_generic

Jan 1 00:01:27 Pineapple kern.info kernel: [ 87.820000] USB Serial deregistering driver generic

Jan 1 00:01:27 Pineapple kern.info kernel: [ 87.820000] usbcore: deregistering interface driver usbserial

Jan 1 00:01:30 Pineapple kern.info kernel: [ 90.920000] usbcore: registered new interface driver usbserial

Jan 1 00:01:30 Pineapple kern.info kernel: [ 90.930000] USB Serial support registered for generic

Jan 1 00:01:30 Pineapple kern.info kernel: [ 90.930000] usbserial_generic 1-1:1.0: generic converter detected

Jan 1 00:01:30 Pineapple kern.info kernel: [ 90.940000] usb 1-1: generic converter now attached to ttyUSB0

Jan 1 00:01:30 Pineapple kern.info kernel: [ 90.940000] usbserial_generic 1-1:1.1: generic converter detected

Jan 1 00:01:30 Pineapple kern.info kernel: [ 90.950000] usb 1-1: generic converter now attached to ttyUSB1

Jan 1 00:01:30 Pineapple kern.info kernel: [ 90.960000] usbserial_generic 1-1:1.2: generic converter detected

Jan 1 00:01:30 Pineapple kern.info kernel: [ 90.960000] usb 1-1: generic converter now attached to ttyUSB2

Jan 1 00:01:30 Pineapple kern.info kernel: [ 90.970000] usbcore: registered new interface driver usbserial_generic

Jan 1 00:01:30 Pineapple kern.info kernel: [ 90.970000] usbserial: USB Serial Driver core

Jan 1 00:01:31 Pineapple user.notice 3g-hotplug: Starting interface wan2 for device ttyUSB0

Jan 1 00:01:34 Pineapple daemon.notice pppd[2748]: pppd 2.4.5 started by root, uid 0

Jan 1 00:01:35 Pineapple local2.info chat[2756]: abort on (BUSY)

Jan 1 00:01:35 Pineapple local2.info chat[2756]: abort on (NO CARRIER)

Jan 1 00:01:35 Pineapple local2.info chat[2756]: abort on (ERROR)

Jan 1 00:01:35 Pineapple local2.info chat[2756]: report (CONNECT)

Jan 1 00:01:35 Pineapple local2.info chat[2756]: timeout set to 10 seconds

Jan 1 00:01:35 Pineapple local2.info chat[2756]: send (AT&F^M)

Jan 1 00:01:35 Pineapple local2.info chat[2756]: expect (OK)

Jan 1 00:01:35 Pineapple local2.info chat[2756]: AT&F^M^M

Jan 1 00:01:35 Pineapple local2.info chat[2756]: OK

Jan 1 00:01:35 Pineapple local2.info chat[2756]: -- got it

Jan 1 00:01:35 Pineapple local2.info chat[2756]: send (ATE1^M)

Jan 1 00:01:35 Pineapple local2.info chat[2756]: expect (OK)

Jan 1 00:01:35 Pineapple local2.info chat[2756]: ^M

Jan 1 00:01:35 Pineapple user.notice root: 3G: firewall stopped

Jan 1 00:01:36 Pineapple local2.info chat[2756]: ATE1^M^M

Jan 1 00:01:36 Pineapple local2.info chat[2756]: OK

Jan 1 00:01:36 Pineapple local2.info chat[2756]: -- got it

Jan 1 00:01:36 Pineapple local2.info chat[2756]: send (AT+CGDCONT=1,"IP","live.vodafone.com"^M)

Jan 1 00:01:36 Pineapple local2.info chat[2756]: timeout set to 30 seconds

Jan 1 00:01:36 Pineapple local2.info chat[2756]: expect (OK)

Jan 1 00:01:36 Pineapple local2.info chat[2756]: ^M

Jan 1 00:01:36 Pineapple local2.info chat[2756]: AT+CGDCONT=1,"IP","live.vodafone.com"^M^M

Jan 1 00:01:36 Pineapple local2.info chat[2756]: OK

Jan 1 00:01:36 Pineapple local2.info chat[2756]: -- got it

Jan 1 00:01:36 Pineapple local2.info chat[2756]: send (ATD*99***1#^M)

Jan 1 00:01:36 Pineapple local2.info chat[2756]: expect (CONNECT)

Jan 1 00:01:36 Pineapple local2.info chat[2756]: ^M

Jan 1 00:01:36 Pineapple local2.info chat[2756]: ATD*99***1#^M^M

Jan 1 00:01:36 Pineapple local2.info chat[2756]: CONNECT

Jan 1 00:01:36 Pineapple local2.info chat[2756]: -- got it

Jan 1 00:01:36 Pineapple local2.info chat[2756]: send ( ^M)

Jan 1 00:01:36 Pineapple daemon.info pppd[2748]: Serial connection established.

Jan 1 00:01:36 Pineapple daemon.info pppd[2748]: Using interface 3g-wan2

Jan 1 00:01:36 Pineapple daemon.notice pppd[2748]: Connect: 3g-wan2 <--> /dev/ttyUSB0

Jan 1 00:01:50 Pineapple daemon.warn pppd[2748]: Could not determine remote IP address: defaulting to 10.64.64.64

Jan 1 00:01:50 Pineapple daemon.notice pppd[2748]: replacing old default route to br-lan [172.16.42.42]

Jan 1 00:01:50 Pineapple daemon.notice pppd[2748]: local IP address 10.31.148.93

Jan 1 00:01:50 Pineapple daemon.notice pppd[2748]: remote IP address 10.64.64.64

Jan 1 00:01:50 Pineapple daemon.notice pppd[2748]: primary DNS address 10.143.147.147

Jan 1 00:01:50 Pineapple daemon.notice pppd[2748]: secondary DNS address 10.143.147.148

Jan 1 00:01:51 Pineapple user.notice ifup: Enabling Router Solicitations on wan2 (3g-wan2)

Jan 1 00:01:51 Pineapple user.info autossh[2964]: starting ssh (count 1)

Jan 1 00:01:51 Pineapple user.info autossh[2964]: ssh child pid is 2965

Jan 1 00:01:51 Pineapple user.err autossh[2964]: ssh exited prematurely with status 1; autossh exiting

Jan 1 00:02:04 Pineapple authpriv.info dropbear[2966]: Child connection from 172.16.42.168:63392

Jan 1 00:02:13 Pineapple authpriv.notice dropbear[2966]: Password auth succeeded for 'root' from 172.16.42.168:63392

Jan 1 00:02:14 Pineapple daemon.info dnsmasq[1737]: reading /tmp/resolv.conf.auto

Jan 1 00:02:14 Pineapple daemon.info dnsmasq[1737]: using nameserver 10.143.147.148#53

Jan 1 00:02:14 Pineapple daemon.info dnsmasq[1737]: using nameserver 10.143.147.147#53

Jan 1 00:02:14 Pineapple daemon.info dnsmasq[1737]: using nameserver 8.8.8.8#53

Jan 1 00:02:14 Pineapple daemon.info dnsmasq[1737]: using local addresses only for domain lan

3G Script Below

#!/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

Any Ideas, it almost seems like the firewall is blocking it somehow..?

Link to comment
Share on other sites

1.0.2

Since i posted the previous post i was able to ping 8.8.8.8 fine, however writing this post i'm not able to ping any address again.

However i still have a 3G IP. i've got 3G bootup enabled and 3G redial enabled.

Theres nothing in the logs after the initial 3G connection.

Link to comment
Share on other sites

  • 4 weeks later...

I use this script to my modem Huawei E173s-6

*12d1:1c05*)	echo "Huawei E173s-6 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=internet.movistar.com.co 
		uci set network.wan2.username=movistar
		uci set network.wan2.password=movistar
		uci set network.wan2.defaultroute=1 
		uci commit network 
		sleep 10; rmmod usbserial
		sleep 3; insmod usbserial vendor=0x12d1 product=0x1c05
		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

		;;

apparently all goes well, the connection is successful but then the modem disconnects and shutdown

Jan  1 00:11:29 Pineapple user.notice root: 3G: Connection Script here, searching for modems
Jan  1 00:11:31 Pineapple kern.info kernel: [  691.110000] usb 1-1: new high-speed USB device number 27 using ath79-ehci
Jan  1 00:11:31 Pineapple kern.info kernel: [  691.600000] usbserial_generic 1-1:1.0: generic converter detected
Jan  1 00:11:31 Pineapple kern.info kernel: [  691.610000] usb 1-1: generic converter now attached to ttyUSB0
Jan  1 00:11:31 Pineapple kern.info kernel: [  691.610000] usbserial_generic 1-1:1.1: generic converter detected
Jan  1 00:11:31 Pineapple kern.info kernel: [  691.620000] usb 1-1: generic converter now attached to ttyUSB1
Jan  1 00:11:31 Pineapple kern.info kernel: [  691.620000] usbserial_generic 1-1:1.2: generic converter detected
Jan  1 00:11:31 Pineapple kern.info kernel: [  691.630000] usb 1-1: generic converter now attached to ttyUSB2
Jan  1 00:11:31 Pineapple kern.info kernel: [  691.640000] scsi32 : usb-storage 1-1:1.3
Jan  1 00:11:31 Pineapple kern.info kernel: [  691.650000] scsi33 : usb-storage 1-1:1.4
Jan  1 00:11:31 Pineapple syslog.notice usb_modeswitch: switched to 12d1:1c05 on 001/026
Jan  1 00:11:31 Pineapple user.notice usb-modeswitch: 1-1:1.1: Manufacturer=HUAWEI Product=HUAWEI_Mobile Serial=?
Jan  1 00:11:32 Pineapple user.notice root: 3G: Connection Script here, searching for modems
Jan  1 00:11:32 Pineapple user.notice usb-modeswitch: 1-1:1.0: Manufacturer=HUAWEI Product=HUAWEI_Mobile Serial=?
Jan  1 00:11:32 Pineapple user.notice 3g-hotplug: Starting interface wan2 for device ttyUSB0
Jan  1 00:11:32 Pineapple user.notice usb-modeswitch: 1-1:1.1: Manufacturer=HUAWEI Product=HUAWEI_Mobile Serial=?
Jan  1 00:11:33 Pineapple user.notice usb-modeswitch: 1-1:1.2: Manufacturer=HUAWEI Product=HUAWEI_Mobile Serial=?
Jan  1 00:11:33 Pineapple user.notice usb-modeswitch: 1-1:1.3: Manufacturer=HUAWEI Product=HUAWEI_Mobile Serial=?
Jan  1 00:11:34 Pineapple user.notice usb-modeswitch: 1-1:1.4: Manufacturer=HUAWEI Product=HUAWEI_Mobile Serial=?
Jan  1 00:11:34 Pineapple kern.notice kernel: [  694.180000] scsi 32:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
Jan  1 00:11:34 Pineapple kern.notice kernel: [  694.190000] scsi 32:0:0:0: Attached scsi generic sg0 type 5
Jan  1 00:11:34 Pineapple kern.notice kernel: [  694.200000] scsi 33:0:0:0: Direct-Access     HUAWEI   SD Storage       2.31 PQ: 0 ANSI: 2
Jan  1 00:11:34 Pineapple kern.notice kernel: [  694.200000] sd 33:0:0:0: Attached scsi generic sg1 type 0
Jan  1 00:11:34 Pineapple kern.notice kernel: [  694.220000] sd 33:0:0:0: [sda] Attached SCSI removable disk
Jan  1 00:11:36 Pineapple daemon.notice pppd[4629]: pppd 2.4.5 started by root, uid 0
Jan  1 00:11:37 Pineapple local2.info chat[4634]: abort on (BUSY)
Jan  1 00:11:37 Pineapple local2.info chat[4634]: abort on (NO CARRIER)
Jan  1 00:11:37 Pineapple local2.info chat[4634]: abort on (ERROR)
Jan  1 00:11:37 Pineapple local2.info chat[4634]: report (CONNECT)
Jan  1 00:11:37 Pineapple local2.info chat[4634]: timeout set to 10 seconds
Jan  1 00:11:37 Pineapple local2.info chat[4634]: send (AT&amp;F^M)
Jan  1 00:11:37 Pineapple local2.info chat[4634]: expect (OK)
Jan  1 00:11:39 Pineapple local2.info chat[4634]: ^M
Jan  1 00:11:39 Pineapple local2.info chat[4634]: ^STIN: 0, 0, 0^M
Jan  1 00:11:39 Pineapple local2.info chat[4634]: AT&amp;F^M^M
Jan  1 00:11:39 Pineapple local2.info chat[4634]: OK
Jan  1 00:11:39 Pineapple local2.info chat[4634]:  -- got it
Jan  1 00:11:39 Pineapple local2.info chat[4634]: send (ATE1^M)
Jan  1 00:11:39 Pineapple local2.info chat[4634]: expect (OK)
Jan  1 00:11:39 Pineapple local2.info chat[4634]: ^M
Jan  1 00:11:39 Pineapple local2.info chat[4634]: ATE1^M^M
Jan  1 00:11:39 Pineapple local2.info chat[4634]: OK
Jan  1 00:11:39 Pineapple local2.info chat[4634]:  -- got it
Jan  1 00:11:39 Pineapple local2.info chat[4634]: send (AT+CGDCONT=1,"IP","internet.movistar.com.co"^M)
Jan  1 00:11:39 Pineapple local2.info chat[4634]: timeout set to 30 seconds
Jan  1 00:11:39 Pineapple local2.info chat[4634]: expect (OK)
Jan  1 00:11:39 Pineapple local2.info chat[4634]: ^M
Jan  1 00:11:39 Pineapple local2.info chat[4634]: AT+CGDCONT=1,"IP","i^M
Jan  1 00:11:39 Pineapple local2.info chat[4634]: ^STIN: 99, 0, 0^M
Jan  1 00:11:40 Pineapple local2.info chat[4634]: nternet.movistar.com.co"^M^M
Jan  1 00:11:40 Pineapple local2.info chat[4634]: OK
Jan  1 00:11:40 Pineapple local2.info chat[4634]:  -- got it
Jan  1 00:11:40 Pineapple local2.info chat[4634]: send (ATD*99***1#^M)
Jan  1 00:11:40 Pineapple local2.info chat[4634]: expect (CONNECT)
Jan  1 00:11:40 Pineapple local2.info chat[4634]: ^M
Jan  1 00:11:40 Pineapple local2.info chat[4634]: ATD*99***1#^M^M
Jan  1 00:11:40 Pineapple local2.info chat[4634]: CONNECT
Jan  1 00:11:40 Pineapple local2.info chat[4634]:  -- got it
Jan  1 00:11:40 Pineapple local2.info chat[4634]: send ( ^M)
Jan  1 00:11:40 Pineapple daemon.info pppd[4629]: Serial connection established.
Jan  1 00:11:40 Pineapple daemon.info pppd[4629]: Using interface 3g-wan2
Jan  1 00:11:40 Pineapple daemon.notice pppd[4629]: Connect: 3g-wan2 &lt;--&gt; /dev/ttyUSB0
Jan  1 00:11:41 Pineapple daemon.info pppd[4629]: CHAP authentication succeeded: Welcome!!
Jan  1 00:11:41 Pineapple daemon.notice pppd[4629]: CHAP authentication succeeded
Jan  1 00:11:44 Pineapple kern.info kernel: [  704.920000] usb 1-1: USB disconnect, device number 27
Jan  1 00:11:44 Pineapple daemon.info pppd[4629]: Hangup (SIGHUP)
Jan  1 00:11:44 Pineapple daemon.notice pppd[4629]: Modem hangup
Jan  1 00:11:44 Pineapple daemon.notice pppd[4629]: Connection terminated.
Jan  1 00:11:45 Pineapple kern.info kernel: [  704.920000] generic ttyUSB0: generic converter now disconnected from ttyUSB0
Jan  1 00:11:45 Pineapple kern.info kernel: [  704.930000] usbserial_generic 1-1:1.0: device disconnected
Jan  1 00:11:45 Pineapple kern.info kernel: [  704.940000] generic ttyUSB1: generic converter now disconnected from ttyUSB1
Jan  1 00:11:45 Pineapple kern.info kernel: [  704.940000] usbserial_generic 1-1:1.1: device disconnected
Jan  1 00:11:45 Pineapple kern.info kernel: [  704.950000] generic ttyUSB2: generic converter now disconnected from ttyUSB2
Jan  1 00:11:45 Pineapple kern.info kernel: [  704.950000] usbserial_generic 1-1:1.2: device disconnected
Jan  1 00:11:45 Pineapple user.notice 3g-hotplug: Stopping interface wan2 for device ttyUSB0
Jan  1 00:11:45 Pineapple daemon.info pppd[4629]: Terminating on signal 15
Jan  1 00:11:45 Pineapple daemon.info pppd[4629]: Exit.
Jan  1 00:11:45 Pineapple kern.info kernel: [  705.270000] usb 1-1: new high-speed USB device number 28 using ath79-ehci
Jan  1 00:11:45 Pineapple kern.err kernel: [  705.430000] hub 1-0:1.0: unable to enumerate USB device on port 1
Jan  1 00:11:53 Pineapple user.notice root: 3G: firewall stopped

Has anyone had this problem?

Link to comment
Share on other sites

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

Hi Thetra,

Are you able to use micrSD card in E353? I'm experiencing problems with my E160.

Thank you,

Nik

Link to comment
Share on other sites

  • 4 weeks later...

Just a quick tip for those like me who experience problem to automount the sdcard in the modem at boot :) My sdcard was not mounting at boot and I had to launch /etc/init.d/fstad reload to mount it by ssh.

Edit /etc/init.d/fstad to add sleep 15 in the start() function like this:

start() {
	. /lib/functions/mount.sh

	sleep 15

	config_load fstab
	mkdir -p /var/lock
	lock /var/lock/fstab.lck
	[ -e /tmp/fstab ] || {
		echo '# WARNING: this is an auto generated file, please use uci to set defined filesystems' &gt; /tmp/fstab
	}
	lock -u /var/lock/fstab.lck
	config_foreach do_swapon swap
	config_foreach do_mount mount
	config_foreach do_swapon swap  # do swap a second time so that swap on filesystems is enabled
}

Link to comment
Share on other sites

Just a quick tip for those like me who experience problem to automount the sdcard in the modem at boot :) My sdcard was not mounting at boot and I had to launch /etc/init.d/fstad reload to mount it by ssh.

Edit /etc/init.d/fstad to add sleep 15 in the start() function like this:

start() {
	. /lib/functions/mount.sh

	sleep 15

	config_load fstab
	mkdir -p /var/lock
	lock /var/lock/fstab.lck
	[ -e /tmp/fstab ] || {
		echo '# WARNING: this is an auto generated file, please use uci to set defined filesystems' &gt; /tmp/fstab
	}
	lock -u /var/lock/fstab.lck
	config_foreach do_swapon swap
	config_foreach do_mount mount
	config_foreach do_swapon swap  # do swap a second time so that swap on filesystems is enabled
}

Hi Whistle Master!

Thank you for your recommendation.

However I still have an issue.

My setup: MarkIV, ver 2.2.0

MicroSD was formated as per Darren post. The MicroSD card is inserted into HUAWEI E160 3G dongle.

Before changing the fstab file, when I boot MARK with 3G dongle inserted, I wasn't able to ssh into it upon finishig the boot. Always had to remove the dongle, reboot MARK, insert the dongle, issue mkswap /dev/sda. Only then the swap and /usb were mounted. Note: I was issuing mkswap /dev/sda not /dev/sda2 as others did. When I was trying to use /dev/sda2 I was getting Unknown device error.

Now, I changed the fstab as per your recommendation and I'm able to ssh to MARK with the dongle inserted upon boot. However my miscrosd card is still not automounted.

Any ideas?

Here is my 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/sda1

option fstype ext4

option options rw,sync

option enabled 1

option enabled_fsck 0

config swap

option device /dev/sda2

option enabled 1

Here is a part of the dmesg output:

36.720000] usbcore: registered new interface driver ath9k_htc

[ 36.860000] usbcore: registered new interface driver usbserial

[ 36.870000] USB Serial support registered for generic

[ 36.870000] usbcore: registered new interface driver usbserial_generic

[ 36.880000] usbserial: USB Serial Driver core

[ 37.010000] Error: Driver 'gpio-keys-polled' is already registered, aborting...

[ 37.120000] scsi 3:0:0:0: Attached scsi generic sg0 type 5

[ 37.120000] sd 4:0:0:0: Attached scsi generic sg1 type 0

[ 41.910000] Unable to find swap-space signature

[ 42.460000] Unable to find swap-space signature

[ 43.670000] Unable to find swap-space signature

[ 44.080000] Unable to find swap-space signature

[ 44.480000] Unable to find swap-space signature

[ 44.900000] Unable to find swap-space signature

[ 47.740000] device eth0 entered promiscuous mode

[ 48.780000] eth0: link up (1000Mbps/Full duplex)

logread output:

Jan 1 00:00:37 Pineapple kern.info kernel: [ 11.430000] usbcore: registered new interface driver usbfs

Jan 1 00:00:37 Pineapple kern.info kernel: [ 11.430000] usbcore: registered new interface driver hub

Jan 1 00:00:37 Pineapple kern.info kernel: [ 11.440000] usbcore: registered new device driver usb

Jan 1 00:00:37 Pineapple kern.info kernel: [ 12.010000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver

Jan 1 00:00:37 Pineapple kern.info kernel: [ 12.010000] ath79-ehci ar933x-ehci: Atheros built-in EHCI controller

Jan 1 00:00:37 Pineapple kern.err kernel: [ 37.020000] Error: Driver 'gpio-keys-polled' is already registered, aborting...

Jan 1 00:00:37 Pineapple kern.notice kernel: [ 37.130000] scsi 3:0:0:0: Attached scsi generic sg0 type 5

Jan 1 00:00:37 Pineapple kern.notice kernel: [ 37.130000] sd 4:0:0:0: Attached scsi generic sg1 type 0

Jan 1 00:00:39 Pineapple user.notice usb-modeswitch: 1-0:1.0: Manufacturer=Linux_3.2.14_ehci_hcd Product=Atheros_built-in_EHCI_controller Serial=ar933x-ehci

Jan 1 00:00:39 Pineapple user.notice usb-modeswitch: 1-1:1.0: Manufacturer=HUAWEI_Technology Product=HUAWEI_Mobile Serial=?

Jan 1 00:00:39 Pineapple user.notice usb-modeswitch: 1-1:1.0: Selecting /etc/usb_modeswitch.d/12d1:1003 for mode switching

Jan 1 00:00:39 Pineapple user.notice usb-modeswitch: switching seemingly failed

Jan 1 00:00:39 Pineapple user.notice usb-modeswitch: switching seemingly failed

Jan 1 00:00:39 Pineapple user.notice usb-modeswitch: switching seemingly failed

Jan 1 00:00:39 Pineapple user.notice usb-modeswitch: switching seemingly failed

Jan 1 00:00:39 Pineapple user.notice usb-modeswitch: switching seemingly failed

Jan 1 00:00:39 Pineapple user.notice usb-modeswitch: switching seemingly failed

Jan 1 00:00:39 Pineapple user.notice usb-modeswitch: switching seemingly failed

Jan 1 00:00:40 Pineapple user.notice usb-modeswitch: 1-1:1.1: Manufacturer=HUAWEI_Technology Product=HUAWEI_Mobile Serial=?

Jan 1 00:00:40 Pineapple user.notice usb-modeswitch: 1-1:1.1: Selecting /etc/usb_modeswitch.d/12d1:1003 for mode switching

Jan 1 00:00:40 Pineapple user.notice usb-modeswitch: switching seemingly failed

Jan 1 00:00:40 Pineapple user.notice usb-modeswitch: switching seemingly failed

Jan 1 00:00:40 Pineapple user.notice usb-modeswitch: switching seemingly failed

Jan 1 00:00:40 Pineapple user.notice usb-modeswitch: switching seemingly failed

Jan 1 00:00:40 Pineapple user.notice usb-modeswitch: switching seemingly failed

Jan 1 00:00:40 Pineapple user.notice usb-modeswitch: switching seemingly failed

Jan 1 00:00:40 Pineapple user.notice usb-modeswitch: switching seemingly failed

Jan 1 00:00:40 Pineapple user.notice usb-modeswitch: 1-1:1.2: Manufacturer=HUAWEI_Technology Product=HUAWEI_Mobile Serial=?

Jan 1 00:00:40 Pineapple user.notice usb-modeswitch: 1-1:1.2: Selecting /etc/usb_modeswitch.d/12d1:1003 for mode switching

Jan 1 00:00:40 Pineapple user.notice usb-modeswitch: switching seemingly failed

Jan 1 00:00:40 Pineapple user.notice usb-modeswitch: switching seemingly failed

Jan 1 00:00:40 Pineapple user.notice usb-modeswitch: switching seemingly failed

Jan 1 00:00:40 Pineapple user.notice usb-modeswitch: switching seemingly failed

Jan 1 00:00:40 Pineapple user.notice usb-modeswitch: switching seemingly failed

Jan 1 00:00:40 Pineapple user.notice usb-modeswitch: switching seemingly failed

Jan 1 00:00:40 Pineapple user.notice usb-modeswitch: switching seemingly failed

Jan 1 00:00:40 Pineapple user.notice usb-modeswitch: 1-1:1.3: Manufacturer=HUAWEI_Technology Product=HUAWEI_Mobile Serial=?

Jan 1 00:00:40 Pineapple user.notice usb-modeswitch: 1-1:1.3: Selecting /etc/usb_modeswitch.d/12d1:1003 for mode switching

Jan 1 00:00:40 Pineapple user.notice usb-modeswitch: switching seemingly failed

Jan 1 00:00:40 Pineapple user.notice usb-modeswitch: switching seemingly failed

Jan 1 00:00:40 Pineapple user.notice usb-modeswitch: switching seemingly failed

Jan 1 00:00:40 Pineapple user.notice usb-modeswitch: switching seemingly failed

Jan 1 00:00:40 Pineapple user.notice usb-modeswitch: switching seemingly failed

Jan 1 00:00:40 Pineapple user.notice usb-modeswitch: switching seemingly failed

Jan 1 00:00:40 Pineapple user.notice usb-modeswitch: switching seemingly failed

Jan 1 00:00:41 Pineapple kern.err kernel: [ 41.920000] Unable to find swap-space signature

Jan 1 00:00:42 Pineapple kern.err kernel: [ 42.470000] Unable to find swap-space signature

Jan 1 00:00:43 Pineapple kern.err kernel: [ 43.690000] Unable to find swap-space signature

Jan 1 00:00:44 Pineapple kern.err kernel: [ 44.100000] Unable to find swap-space signature

Jan 1 00:00:44 Pineapple kern.err kernel: [ 44.500000] Unable to find swap-space signature

Jan 1 00:00:44 Pineapple kern.err kernel: [ 44.920000] Unable to find swap-space signature

Edited by niggizito
Link to comment
Share on other sites

Your fstab is wrong, it should be like this:

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

I know, it can be strange to put two entries but it seems that mount has to query the 3g dongle for its partition layout before the kernel can see the partitions on the USB.

Edited by Whistle Master
Link to comment
Share on other sites

Your fstab is wrong, it should be like this:

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

I know, it can be strange to put two entries but it seems that mount has to query the 3g dongle for its partition layout before the kernel can see the partitions on the USB.

I'm at work. Will report back once I'm home!

Thank you WM!

Edited by niggizito
Link to comment
Share on other sites

  • 1 month later...

I have a Huawei E173s modem.

It is reported as 12d1:1c0b (modem off) when running as a sdcard reader / USB masstorage.

It is reported as 12d1:1c05 (modem on) when running as a 3g-modem.

I've gotten it to work in both modes seperately. I.e. either usbstorage with swap, /usb etc. or as a 3g modem.

What I'm wondering now is if it's possible to get it to work as both simultaneously?

I'd like to use the sdcardslot for swap, /usb and at the same time use the 3g modem.

Link to comment
Share on other sites

I recently got myself a Huawei E353 (12d1:14db) and I'm having issues making it work.

Pineapple firmware is 2.4.1. I get errors when executing these lines.

root@Pineapple:~# ls /dev/ttyUSB*

ls: /dev/ttyUSB*: No such file or directory

root@Pineapple:~# insmod usbserial vendor=0x12d1 product=0x14db

insmod: can't insert 'usbserial': File exists

root@Pineapple:~# lsusb

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 001 Device 014: ID 12d1:14db Huawei Technologies Co., Ltd.

(also, the huawei is disappearing a while after it has been plugged in)

The 3G modem script I have is

*12d1:14db*) echo "Huawei Modem E353 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=internet

uci set network.wan2.username=

uci set network.wan2.password=

uci set network.wan2.defaultroute=1

uci commit network

usb_modeswitch -v 12d1 -p 14db -V 12d1 -P 14db

sleep 10; rmmod usbserial

sleep 3; insmod usbserial vendor=0x12d1 product=0x14db

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

APN, username and pwd should be correct

I added the product's info to usb_modeswitch folder

root@Pineapple:/etc/usb_modeswitch.d# cat 12d1:14db

# Huawei E353

DefaultVendor=0x12d1

DefaultProduct=0x14db

TargetClass=0xff

CheckSuccess=20

HuaweiMode=1

Where should I look into next?

Edited by Splosh
Link to comment
Share on other sites

  • 7 months later...

I got a 3G Huawei E1756 working but cant mount the sd card. When I use the sd card on a pendrive adpater works fine, with its modules installed.

This is my fstab

config global automount
       option from_fstab 1
       option anon_mount 1

config global autoswap
       option from_fstab 1
       option anon_swap 0

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

Any idea to fix this?

Thanks.

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.

  • Recently Browsing   0 members

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