Jump to content

Uk 3g Working Setup - Three.co.uk


Recommended Posts

Finally manged to get a USB 3G connection running. As new to linux it took ages to work out all the commands and what each line meant on the 3G web setup page.

First I tried a Three.co.uk ZTE Model MF112 HSUPA USB Stick thinking this was a more basic 3G dongle and might work better, but no matter what settings I tried I could not get it to work.

As a FYI I found running the 3G connect script via SSH easy and then looking at the log file via the web interface works nicely.

SSH into 172.16.42.1 then run the 3G connect script from /www/pineapple/3g/3g.sh

I then attempted to get it to work with the more advanced Huawei Mobile Broadband E367 HSPA+ USB Rotator model and this is now working 100%. In case it helps anybody my settings are as follows;

Note APN settings for three.co.uk (username and password are left blank but use '' in config file) You can also "unlock" your dongle then use your own Mobile (cell) providers Sim.

#!/bin/sh

echo "

logfile /dev/null

noaccomp

nopcomp

nocrtscts

lock

maxfail 0" > /etc/ppp/options

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

post-40000-0-30942300-1339838516_thumb.j

post-40000-0-98293000-1339838526_thumb.j

Edited by Cultmanhak5
Link to comment
Share on other sites

I have also managed to get a MF637 (unlocked) working with three UK, however i need to dig up the settings as i forgot to backup after doing a upgrade to my pineapple.

I am going to try a giffgaff sim card in it next week as they seem to be fairly cheap for mobile broadband.

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