This is my note on installing Huawei E220 modem on FreeBSD 7.0.
Requirements:
1. Download kernel patch here.
2. Patch kernel:
# cd /sys/dev/usb/
# patch < /root/e220-usb.diff
3. Rebuild and install kernel. Don’t forget to unload umass kernel.
4. Load module ubsa and umass by add in this line into /boot/loader.conf file.
ubsa_load=”YES”
umass_load=”YES”
5. Reboot.
6. Check whether ubsa module has been loaded.
# kldstat
Id Refs Address Size Name 1 20 0xc0400000 72e17c kernel 2 1 0xc0b2f000 e6a4 if_iwi.ko 3 3 0xc0b3e000 2f9c firmware.ko 4 1 0xc0b41000 6cdc ugen.ko 5 1 0xc0b48000 75b4 umass.ko 6 1 0xc0b50000 7958 ng_ubt.ko 7 2 0xc0b58000 cb78 netgraph.ko 8 1 0xc0b65000 2ef0 ubsa.ko 9 2 0xc0b68000 4374 ucom.ko
7. Execute ‘dmesg’, find for ‘Huawei’ dan ‘ucom0’.
ucom0: at uhub1 port 1 (addr 2) disconnected ucom0: HUAWEI Technologies HUAWEI Mobile, rev 1.10/0.00, addr 2
8. If the modem has been detected as ucom0 device, add this configuration into /etc/ppp/ppp.conf.
three: set device /dev/cuaU0 set speed 57600 set phone *99# set authname set authkey set ifaddr 10.0.0.1/0 10.0.0.2/0 0.0.0.0 0.0.0.0 set vj slotcomp off add default HISADDR
9. Dial ppp.
$ ppp three
ppp> dial
Ppp>
PPp>
PPP>
Look for 3 capital P, it means modem is connected to internet. And then test with ping:
$ ping google.com
Check modem interface with ‘ifconfig’:
$ ifconfig tun0
tun0: flags=8051 mtu 1500
inet 119.11.32.164 –> 10.0.0.2 netmask 0xffffffff
Opened by PID 22997
Note:
PPP will timeout if has been idle for minutes. Use -dial to non-activate timeout.
# ppp -ddial three