Dobrica Pavlinušić's random unstructured stuff
Huawei E220: Revision 8
{toc: }

^ Working configuration

(for me at least :-)

^^ /etc/ppp/peers/huawei-e220

.pre
dpavlin@llin:~$ cat /etc/ppp/peers/huawei-e220
# /etc/ppp/peers/huawei-e220 pppd script
# pppd call huawei-e220

debug
kdebug 3
nodetach
#persist

/dev/ttyUSB0
460800
idle 7200
noipdefault
defaultroute
usepeerdns

connect "/usr/sbin/chat -vf /etc/chatscripts/huawei-e220.chat"

# avoid compression:
noccp
#nobsdcomp
novj
# t-mobile specific?
#ipcp-restart 8
#ipcp-max-configure 50
#ipcp-accept-local
#ipcp-accept-remote
#ipcp-max-failure 20

lcp-echo-failure 0
lcp-echo-interval 0

modem
crtscts

require-pap
refuse-chap

show-password
user YOUR_USERNAME@DOMAIN
password YOUR_PASSWORD

passive
.pre

^^ /etc/chatscripts/huawei-e220.chat

.pre
dpavlin@llin:~$ cat /etc/chatscripts/huawei-e220.chat
TIMEOUT 3
ABORT BUSY
ABORT 'NO CARRIER'
ABORT VOICE
ABORT 'NO DIALTONE'
ABORT 'NO DIAL TONE'
ABORT 'NO ANSWER'
ABORT DELAYED
"" ATZ
OK ATQ0V1E1S0=0&C1&D2
OK AT+COPS?
OK AT+CGDCONT=1,"ip","carnet.vip.hr"
OK ATDT*99#
CONNECT ""
.pre

^ Links

* http://wwwu.uni-klu.ac.at/agebhard/HuaweiE220/
* another tutorial: http://ske.sourceforge.net/html/projects/huawei/huawei_tre.html
* interesting compilation of configuration files and stat tool: http://oozie.fm.interia.pl/pro/huawei-e220/
* Ubuntu, GUI: http://sistemac-portal.carnet.hr/node/335
* source: http://www.kanoistika.sk/bobovsky/archiv/umts/
* ObWikipedia: http://en.wikipedia.org/wiki/Huawei_E220

^ Turn off pin

.pre
$ cu -l /dev/ttyUSB0
at+clck="sc",0,"PIN!"
OK
.pre

^ libusb driver program

^^ Compilation

Get source from http://www.kanoistika.sk/bobovsky/archiv/umts/huaweiAktBbo.c

.pre
cc huaweiAktBbo.c -o huaweiAktBbo -lusb
.pre

^ hal problem

If you modem is restarting like mad, it's problem with hal.

* http://wiki.archlinux.org/index.php/Huawei_E220

^ CD image update

Since device can emulate USB CDROM, I will try to update image on it to provide bios update image instead of useless (to me) Windows drivers.

^^ dmesg

.pre
dpavlin@t61p:~$ uname -a
Linux t61p 2.6.30-1-686-bigmem #1 SMP Mon Aug 3 17:32:39 UTC 2009 i686 GNU/Linux
dpavlin@t61p:~$ dmesg
[ 3405.568120] usb 4-1: new full speed USB device using uhci_hcd and address 2
[ 3405.726188] usb 4-1: New USB device found, idVendor=12d1, idProduct=1003
[ 3405.726196] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 3405.726203] usb 4-1: Product: HUAWEI Mobile
[ 3405.726208] usb 4-1: Manufacturer: HUAWEI Technologies
[ 3405.726384] usb 4-1: configuration #1 chosen from 1 choice
[ 3405.792930] Initializing USB Mass Storage driver...
[ 3405.796244] usb-storage: probe of 4-1:1.0 failed with error -1
[ 3405.796289] usbcore: registered new interface driver usb-storage[ 3405.796296] USB Mass Storage support registered.
[ 3405.952077] usb 4-1: USB disconnect, address 2
[ 3407.432107] usb 4-1: new full speed USB device using uhci_hcd and address 3
[ 3407.590171] usb 4-1: New USB device found, idVendor=12d1, idProduct=1003
[ 3407.590180] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 3407.590187] usb 4-1: Product: HUAWEI Mobile
[ 3407.590192] usb 4-1: Manufacturer: HUAWEI Technologies
[ 3407.590373] usb 4-1: configuration #1 chosen from 1 choice
[ 3407.603280] usb-storage: probe of 4-1:1.2 failed with error -1[ 3407.650695] usbcore: registered new interface driver usbserial
[ 3407.650725] USB Serial support registered for generic
[ 3407.650819] usbcore: registered new interface driver usbserial_generic
[ 3407.650824] usbserial: USB Serial Driver core
[ 3407.663176] USB Serial support registered for GSM modem (1-port)
[ 3407.663293] option 4-1:1.0: GSM modem (1-port) converter detected
[ 3407.663458] usb 4-1: GSM modem (1-port) converter now attached to ttyUSB0
[ 3407.663478] option 4-1:1.1: GSM modem (1-port) converter detected
[ 3407.663576] usb 4-1: GSM modem (1-port) converter now attached to ttyUSB1
[ 3407.663609] usbcore: registered new interface driver option
[ 3407.663614] option: v0.7.2:USB Driver for GSM modems
.pre

^^ links

* http://www.draisberghof.de/usb_modeswitch/