Wiki Page Content

Installing Huawei E220 under FreeBSD 7.0

Initially I thought it would be rather tough but then after some thinkering I found an easy to use solution.

Quick Solution:

cd /sys/dev/usb
fetch http://people.freebsd.org/~erwin/e220-usb.diff

Tune your Kernel Config file and REMOVE ALL usb support options BUT the following:

# USB support
device          uhci            # UHCI PCI->USB interface
device          ehci            # EHCI PCI->USB interface (USB 2.0)
device          usb             # USB Bus (required)

cat << EOF >> /etc/ppp/ppp.conf

hsdpa:
 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
EOF

echo ubsa_load=\"YES\" >> /boot/loader.conf

Recompile Kernel and reboot After reboot you can open an internet connection with

ppp -ddial hsdpa

Long story:

We need to patch the usb support for the "ubsa.ko" module to consider our E220 device.

cd /sys/dev/usb
fetch http://people.freebsd.org/~erwin/e220-usb.diff

Tune your Kernel Config file and REMOVE ALL usb support options BUT the following:

# USB support
device          uhci            # UHCI PCI->USB interface
device          ehci            # EHCI PCI->USB interface (USB 2.0)
device          usb             # USB Bus (required)

It is important that we load the ubsa as a module, strip the umass support as it won't work otherwise. If you want to use the internal memory on the e220, my advice, buy another 8Gb usb stick for a few bucks. We want mobile ADSL nothing else.

Add an entry to your ppp.conf so we can dial-up:

cat << EOF >> /etc/ppp/ppp.conf

hsdpa:
 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
EOF

Add the ubsa module to loader.conf so it gets loaded

echo ubsa_load=\"YES\" >> /boot/loader.conf

Recompile your Kernel, as a hint you can add

KERNCONF=KERNELNAME

to /etc/make.conf

Where KERNELNAME is the actual name of your kernel config file that resides in /sys/i386/conf/ (for i386 kernels)

now you can simply type

cd /usr/src
make kernel

and it will compile your kernel with the correct config file. "make kernel" will effectively do a, "make buildkernel installkernel" so all you need to do is reboot and open a connection with

ppp -ddial hsdpa

FreeBSD e220 (last edited 2011-01-05 17:19:31 by SteveClement)