Penguin
Annotated edit history of HuaweiE220 version 3, including all changes. View license author blame.
Rev Author # Line
3 AndrewSimpson 1 The Huawei E220 / E270 is a USB HSDPA modem. It is sold in NZ by Vodafone as a [Vodem].
1 DanielLawson 2
3 It generally presents a couple of /dev/ttyUSB? devices. If you have a 2.6.20+ kernel, it will present 2 /dev/ttyUSB devices, and you should be able to get it working with wvdial or pppd by accessing /dev/ttyUSB0. If you have an earlier kernel, it'll show three devices, one of which is actually a USB mass storage device, and you'll need to make some changes to your configuration to make it work.
4
3 AndrewSimpson 5 If you have a recent distro such as Ubuntu 9.04 (Intrepid Ibix) or higher, it should "just work". A network-manager wizard will popup asking you to configure it, and it will make some attempt at autodetecting your country/provider.
1 DanielLawson 6
7
8 I've copied configs from different sites below to prevent against page disappearance, and have attributed work where appropriate.
9
10 ----
11
2 DanielLawson 12 !!Kernel version >= 2.6.20
3 AndrewSimpson 13
14 ! network-manager
15
16 It "should" "just work". :)
17
18 For Vodafone New Zealand the recommended APN is www.vodafone.net.nz. DNS addresses are automatically obtained from the server.
19
20 In Ubuntu 9.04 (Jaunty), incorrect DNS servers are given in the default settings for Vodafone New Zealand. This needs to be fixed for the connection to work:
21
22 Open up the 'Edit connections' dialogue and bring up your Vodafone connection for editing. Choose the tab 'IPv4 Settings'; the tab shows "Method: Automatic (PPP) addresses only" and two (incorrect) DNS servers are listed.
23
24 Change the dropdown box to "Method: Automatic (PPP)", the two DNS servers should disappear... otherwise delete them.
25
26 Vodafone gives the correct DNS servers automatically during PPP negotiation. The previous setting prevents PPP setting the DNS servers.
1 DanielLawson 27
2 DanielLawson 28 ! Using pppd:
1 DanielLawson 29
30 The following configs are taken from [http://juanjosec.blogspot.com/2008/09/making-3g-huawei-220-usb-modem-work-in.html] and adjusted for Vodafone NZ.
31
32 Add the following files to your system:
33
34 <verbatim>
35 # /etc/ppp/peers/3g
36 # pppd call 3g nodetach
37 # (using Huawei e220 USB modem)
38 /dev/ttyUSB0
39 #3600000 #irrelevant
40 noipdefault
41 defaultroute
42 user gprs
43 password gprs
44 #persist
45 lock
46 noauth
47 nodetach
48 usepeerdns
49 nodeflate
50 nobsdcomp
51 nopcomp
52 noaccomp
53 novj
54 novjccomp
55 nomagic
56 #asyncmap 0
57 #lcp-echo-failure 10000
58 #lcp-echo-interval 1000
59 lcp-echo-failure 10
60 lcp-echo-interval 30
61 connect '/usr/sbin/chat -v -f /etc/ppp/peers/3g.chat'
62 debug
63 idle 180
64 holdoff 10
65 </verbatim>
66
67 <verbatim>
68 # /etc/ppp/peers/3g.chat
69 TIMEOUT 3
70 ABORT BUSY
71 ABORT 'NO CARRIER'
72 ABORT VOICE
73 ABORT 'NO DIALTONE'
74 ABORT 'NO DIAL TONE'
75 ABORT 'NO ANSWER'
76 ABORT DELAYED
77 "" ATZ
78 OK ATQ0V1E1S0=0&C1&D2
79 OK AT+CGDCONT=1,"IP","internet","0.0.0.0",0,0
80 OK ATDT*99#
81 CONNECT ""
82 </verbatim>
83
84 You can now use "pon 3g" to start your connection.
85
86
2 DanielLawson 87 ! wvdial
1 DanielLawson 88
89 This [page|http://kawruhboso.com/?p=3] has some wvdial configs. I've not tested them.
90
91
3 AndrewSimpson 92 If you use these configs, remember to change the dial number ot *99# (for Vodafone NZ). You may also need care with the Init2 and Init3 lines - compare them to the first 2 lines after ' "" ATZ ' in the 3g.chat script mentioned in the pppd section above.
1 DanielLawson 93
94
2 DanielLawson 95 !!Kernel version < 2.6.20
1 DanielLawson 96
97 The methods described for > 2.6.20 kernels will work, but first of all the pseudo cdrom drive needs to be disabled.
98
99 Not having a machine with an earlier kernel than 2.6.20, the following notes are not tested.
100
2 DanielLawson 101 ! udev rule
1 DanielLawson 102
103 The following config was taken from [http://juanjosec.blogspot.com/2008/09/making-3g-huawei-220-usb-modem-work-in.html]. I have not tested it, but I gather the original author did.
104
105
106
107 <verbatim>
108
109 ## /etc/udev/rules.d/99-huawei.rules
110 ##
111 ## to enable it, run: udevcontrol reload_rules
112 ##
113 #
114 # udev rule for HUAWEI E220 3G HSDPA Modem
115 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
116 # (c)opyleft OOZIE < oozie@poczta.fm >
117 #
118 # This file prevents the pseudo scsi cdrom device from enabling,
119 # thus providing a workaround for kernel versions < 2.6.20
120 #
121 # Minor edition by JuanJo Ciarlante
122 ##
123
124 SUBSYSTEM=="block", \
125 ACTION=="add", \
126 SYSFS{idVendor}=="12d1", \
127 SYSFS{idProduct}=="1003", \
128 RUN="/sbin/modprobe usbserial vendor=0x12d1 product=0x1003", \
129 OPTIONS="ignore_device"
130 </verbatim>
131
132 This [page|http://oozie.fm.interia.pl/pro/huawei-e220/] has more information on this, and was the original author for the above udev config I believe.
133
2 DanielLawson 134 ! usb_modeswitch
1 DanielLawson 135
136 This [page|http://tensixtyone.com/perma/howto-debian-lenny-huawei-e160g/] discusses using a program called usb_modeswitch to work around the USB pseudo device.
137
2 DanielLawson 138 !!See Also
1 DanielLawson 139
140 * [http://juanjosec.blogspot.com/2008/09/making-3g-huawei-220-usb-modem-work-in.html]
141 * [http://oozie.fm.interia.pl/pro/huawei-e220/]
142 * [http://kawruhboso.com/?p=3]
143 * [http://tensixtyone.com/perma/howto-debian-lenny-huawei-e160g/]