Jump to content

Problem mounting µSD with Huawei E303F


firewall1

Recommended Posts

Hi to all.

i want to use my USB 3G modem on pineapple MK4 box.

i succeeded to use the modem by this script :

*12d1:1506*)    echo "Huawei E303F 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=myapnname
                uci set network.wan2.username=myusernameoperator
                uci set network.wan2.password=mypasswordoperator
                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

                ;;

Ok now i would like to mount the 4Gb µSD that i have inside this key.

So my card is Ext4 formatted with 1Gb for Swap (Ext4) and a 3Gb for data (Ext4) (i follow instructions i found in forum).

Now is the problem:

1) in /dev , the name of Sdcard is sdb.

so i modify the fstab with the following options :

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/sdb
       option fstype   ext4
       option options  rw,sync
       option enabled  1
       option enabled_fsck 0


config swap
       option device   /dev/sda2
       option enabled  0

if i do that, i can see my 3Gb partion on ressources

/dev/sda1                 2.9G     68.4M      2.7G   2% /mnt/sda1

But at this step i can not use USB storage (look like not found by pineapple).

if i check in /mnt at this step i have

sda1 and sda2 present.

now i try to mount swap on sda2, so i change config swap to:

config swap
       option device   /dev/sda2
       option enabled  1

i update FStab and i "mkswap /dev/sda2"

i reboot

now i can see my swap :

Swap: 787180 76 787104

but i can not see my 3Gb partition.

Can somebody help me with this pb please ?

Thanks in advance

Firewall1

Link to comment
Share on other sites

I spend my day on this problem so with the result maybe some master can help me :

1) factory reset => paste 3G script : can see swap mounted and sda1 mounted for few second after reboot.... after few second, sda1 diseapear.

2) format scard for remove swap. make 3.9Gb partition => factory reset : sda1 mounted for few second after reboot.... after few second, sda1 diseapear.

can thishelp people forhelp me ?

Thanks

Firewall1

Link to comment
Share on other sites

Try this 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 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

 
Link to comment
Share on other sites

Hello there.

So i found a acceptable solution.

It look like the Fstab mount the Sd card and the 3G script is disturbed by the Fstab ....

What i do is :

disable the option enable in the fs tab :

 
 option enabled 0

Both for sda1 and sda2

now i put this in WPS button script :

mount /dev/sda /usb
mount /dev/sda1 /usb

Now after booting, i wait untill del stop blinking.

I push the button ( i push two times because maybe i should put some tempo...)

Now i look in my ressources and my Sd card is mounted on /usb.

Everything works fine after that .

But i can not enjoy Autostart from SSLstrip...

Maybe a master can found another, better issue to this problem.

Best Regards

Firewall1







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...