I had one of these once. It worked, but the 3's coverage (in London) was rubbish, so I gave it away.
These are the config files I can find on my PC:
Code:
tred@vaio:~$ cat /etc/udev/rules.d/99-sc-huawei-e169g.rules
SUBSYSTEM=="usb" SYSFS{idProduct}=="1001", SYSFS{idVendor}=="12d1", RUN+="/usr/sbin/e169g-switch"
tred@vaio:~$ cat /usr/sbin/e169g-switch
#!/bin/bash
# Switch off the CD rom, start modem-mode
/sbin/usb_modeswitch -v 12d1 -p 1001 -d 1
/sbin/usb_modeswitch -v 12d1 -p 1001 -H 1
echo Huawei-E169G switched to Modem Mode >> /var/log/messages
exit 0
tred@vaio:~$
Note: your path to
usb_modeswitch may be different. I just put it in
/usr/sbin Adjust it if you need to.
Then I ran a script called
salutis-connect :
Code:
tred@vaio:~$ cat /usr/bin/salutis-connect-V4
#!/bin/bash -e
ITEMS=( \
1 "Huawei E220 & E169G Modem" "sc-huawei-e220.wvdial" \
2 "Generic ACM USB Phone" "sc-nokia-acm.wvdial" )
CONFIG="/etc/salutis-connect.conf"
ICON="/usr/share/icons/salutis/scalable/`basename $0`.svg"
TITLE="Salutis Connect"
ADDRESS="www.google.com"
LOG="/var/log/salutis-connect.log"
VERSION=`zcat /usr/share/doc/salutis-connect/changelog.gz | \
awk '$1=="salutis-connect" {print $2}' | head -1 | tr -d '(' | tr -d ')' | \
cut -d '-' -f 1`
function start_network_manager {
for SERVICE in \
"25NetworkManager" \
"26NetworkManagerDispatcher"
do
TERM=vt100 \
/etc/dbus-1/event.d/"$SERVICE" start 2>&1 >> "$LOG"
done
}
if [ `id -u` -eq 0 ]
then
exec 2> "$LOG"
set -x
if [ -e "$CONFIG" ]
then
PREVIOUS="$(cat $CONFIG)"
else
touch "$CONFIG"
fi
# check for existing connection
for CHECK in $(seq 1 2 $((${#ITEMS[@]})))
do
# check if connection exist
if ps -ef | awk '{print $8,$9,$10}' | grep -v grep | \
grep -q "^wvdial -C /etc/${ITEMS[$CHECK]}$"
then
# already connected
zenity \
--question \
--window-icon="$ICON" \
--title="$TITLE" \
--text="You're already connected via '${ITEMS[$((CHECK-1))]}'. Press 'OK' to disconnect."
if [ $? -eq 0 ]
then
# look for process identification number
PROCESS=`ps -ef | awk '$10=="'/etc/"${ITEMS[$CHECK]}"'" {print $2}'`
# kill the process
kill $PROCESS
# wait for termination
for PROGRESS in `seq 95 -5 5`
do
echo $PROGRESS
if ps -ef | awk '{print $2}' | grep -q $PROCESS
then
# wait two seconds
sleep 2
else
# start network manager
start_network_manager
# fill the rest of progres-bar
for FINISH in `seq $PROGRESS -5 5`
do
echo $FINISH
sleep 0.05
done
# print success message
zenity \
--info \
--window-icon="$ICON" \
--title="$TITLE" \
--text="Connection via '${ITEMS[$((CHECK-1))]}' closed."
# kamikadze
kill $$
fi
done | \
zenity \
--progress \
--text="Disconnecting, please wait..." \
--window-icon="$ICON" \
--title="$TITLE" \
--auto-close \
--width=400
# can't disconnect
zenity \
--error \
--window-icon="$ICON" \
--text="Can't disconnect '${ITEMS[$((CHECK-1))]}'."
# start network manager
start_network_manager
# exit with failure
exit 1
else
exit 0
fi
fi
done
# ak konfigurak neexistuje jeden si vytvorime
if [ ! -e "$CONFIG" ]
then
echo "${ITEMS[0]}" > "$CONFIG"
fi
# ak je konfigurak poskodeny, opravime ho
if [ `wc -c "$CONFIG" | awk '{print $1}'` -ne 2 ]
then
echo "${ITEMS[0]}" > "$CONFIG"
fi
# zostavi menu a z konfiguraku zvoli
COUNTER=0
for CHECK in $(seq 1 3 ${#ITEMS[@]})
do
# check if it's default item
if [ "${ITEMS[$((CHECK-1))]}" == "$(cat $CONFIG)" ]
then
MENU[$COUNTER]="True"
else
MENU[$COUNTER]="False"
fi
# store menu item
MENU[$((COUNTER+1))]="${ITEMS[$CHECK]}"
let COUNTER+=3
done
while :
do
# show menu with devices
SELECTION=`zenity \
--title "$TITLE" \
--text "Salutis Connect $VERSION\nRudolf Adamkovič - Salutis\nsalutis@salutis.sk, www.salutis.sk\n\nPlease select your device:\nNote that PIN code must be disabled." \
--list \
--radiolist \
--column "Selection" \
--column "Device" \
--window-icon="$ICON" \
--width=400 \
--height=300 \
"${MENU[@]}"`
[ $? -ne 0 ] && exit 0
# use selected device and continue
if [ -n "$SELECTION" ]
then
for CHECK in $(seq 1 3 ${#ITEMS[@]})
do
if [ "$SELECTION" == "${ITEMS[$CHECK]}" ]
then
echo "${ITEMS[$((CHECK-1))]}" > "$CONFIG"
DIAL="${ITEMS[$((CHECK+1))]}"
break
fi
done
break
else
zenity \
--error \
--title "$TITLE" \
--text "Please select device."
fi
done
# connect
for PROGRESS in `seq 5 5 95`
do
echo $PROGRESS
case $PROGRESS in
5)
# stop network manager - part one
TERM=vt100 \
/etc/dbus-1/event.d/26NetworkManagerDispatcher stop \
2>&1 >> "$LOG"
;;
10)
# stop network manager - part two
TERM=vt100 \
/etc/dbus-1/event.d/25NetworkManager stop \
2>&1 >> "$LOG"
;;
15)
# start dialing sub-process
( wvdial -C /etc/"$DIAL" 2>> "$LOG" >> "$LOG" & )
;;
*)
# check connection
if wget -4 -O - "$ADDRESS" > /dev/null 2>> "$LOG"
then
# connected
for FINISH in `seq $PROGRESS 5 100`
do
echo $FINISH
sleep 0.05
done
# show success message
zenity \
--info \
--window-icon="$ICON" \
--text="Wohoo! You're connected, go ahead :)"
# exit
exit 0
else
# not connected
if [ $PROGRESS -eq 95 ]
then
# start network manager
start_network_manager
# show error message
zenity \
--error \
--title="$TITLE" \
--window-icon="$ICON" \
--text="Oops, error occured! Press 'OK' for details."
zenity \
--text-info \
--filename="$LOG" \
--window-icon="$ICON" \
--title="$TITLE"
# exit
exit 1
else
# waiting for connection
sleep 2
fi
fi
;;
esac
done | zenity \
--progress \
--text="Connecting, please wait..." \
--window-icon="$ICON" \
--title="$TITLE" \
--auto-close \
--width=400
[ $? -ne 0 ] && start_network_manager
else
gksu "$0"
fi
tred@vaio:~$ cat /etc/salutis-connect.conf
1
tred@vaio:~$
Here's another conf file for you:
Code:
tred@vaio:~$ cat /etc/wvdial.conf
[Dialer Defaults]
Modem = /dev/ttyUSB2
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Stupid Mode = 1
Modem Type = Analog Modem
Phone = *99#
Dial Command = ATDT
ISDN = 0
Username = three
IniInit1 = ATZ
Password = three
Baud = 9600
[Dialer three]
Init2 = ATZ
Init3 = ATE0 V1 &D2 &C1 S0=0 +IFC=2,2
Init5 = AT+CGDCONT=1,”IP”,”3internet”
Modem Type = Analog Modem
ISDN = 0
Phone = *99#
Modem = /dev/ttyUSB0
Username = three
Dial Command = ATDT
Stupid Mode = 1
Password = three
Baud = 460800
tred@vaio:~$
The passwords and usernames don't matter in the above as all this is handled by the SIM card in your dongle.
You'll need the
zenity package installed for salutis-connect to work (It makes a window dialog for a bash script, but there are other alternatives)
Hope this helps. The "salutis-connect" site seems to be no longer supported
But here's an (old) link for you:
http://samiux.wordpress.com/2008/04/...on-ubuntu-804/
But I thought modern linux kernels just managed these things OK eg
eeebuntu on my eee701, just detected the Huawei 169 and connected.
Please note that I no longer have this hardware to play with. It was junk (because the network wasn't there).