View Single Post
  #1   (View Single Post)  
Old 30th April 2009
wimwauters wimwauters is offline
Port Guard
 
Join Date: Aug 2008
Posts: 36
Default Huawei E220 USB / UK Three.co.uk

Hi all,

thanks to this forum I got to a working config in the end

I'm on OpenBSD 4.4 release, all patched up ( and I just got my 4.5 cdroms today!)

My setup does not do automatic resolv.conf magic (I don't know, I'm guessing this a pppd feature that's not yet implemented?), so I just swap out prepared resolv.conf_* files

Also, as a roaming sysadmin I often swap interfaces, hence the deleting of default route all the bleeding time

here's the relevant files I created in
/etc/ppp/peers

Code:
# cat three 
/dev/cuaU0
crtscts
921600
modem
defaultroute
noauth
ipcp-restart 10
ipcp-accept-local
ipcp-accept-remote
0.0.0.0:10.64.64.64
connect "usr/sbin/chat -v -f /etc/ppp/peers/three.chat"
Code:
# cat three.chat                                                               
ABORT "NO CARRIER"
ABORT "NO DIALTONE"
ABORT "ERROR"
ABORT "NO ANSWER"
ABORT "BUSY"
ABORT "Username/Password Incorrect"
TIMEOUT 15
"" "AT"
OK "ATZ"
OK "ATQ0V1E1S0=0&C1&D2+FCLASS=0"
OK 'AT+CGDCONT=1,"ip","three.co.uk"'
OK "ATDT*99#"
TIMEOUT 30
CONNECT \d\c
Code:
# cat call_three.sh                                                            
#!/bin/sh
echo Create PPP interface...
ifconfig ppp0 create
echo remove default route
route delete default
echo swap resolv.conf
cp /etc/resolv.conf_three /etc/resolv.conf
echo Sleeping for 5 seconds...
sleep 5
echo Starting pppd...
pppd call three
Code:
# cat close_three.sh 
#!/bin/sh                                                          
echo remove default route
route delete default
echo swap resolv.conf
cp /etc/resolv.conf_home /etc/resolv.conf
This setup allows both Three's and OpenDNS to work,
I got my Three DNS values from running it on my wife's Windos laptop.

Yes, you have to drop into root with su (or do sudo command line magic, not my cup of tea ) to ./call_three.sh and ./close_three.sh

Also, if you are a newbie (or rustie like me), it helps to
Code:
cat /var/logs/messages | grep pppd
a bit.

Last edited by wimwauters; 30th April 2009 at 04:48 PM.
Reply With Quote