This article describes how to expand the default pfSense mobile broadband support by creating a custom build with additional device support. The process is a unification of FreeBSD and Mobile Broadband and building a custom pfSense image.
pfSense is built on top of FreeBSD, so the kernel is identical. Device support can be added or removed simply by recompiling the kernel after modifying its configuration file. The default image builds do not have the necessary tools to allow this, so if you want to add support for a new device you need to rebuild pfSense from sources as described here.
Start from a clean install of FreeBSD 8.3 and follow the build process until you reach step 5.3 “Invoke the Build ISO option”. Before you start this step, create the following patch called “broadband.diff” replacing all instances of ????? with your corresponding device information:
--- ./sys/dev/usb/serial/u3g.c 2012-03-06 14:37:00.000000000 +0100 +++ ./sys/dev/usb/serial/u3g.c.new 2012-06-03 18:19:07.000000000 +0200 @@ -460,2 +460,3 @@ U3G_DEV(SIERRA, E6892, 0), + U3G_DEV(?????, ?????, 0), U3G_DEV(SIERRA, E6893, 0), --- sys/dev/usb/usbdevs 2012-06-03 18:26:29.000000000 +0200 +++ sys/dev/usb/usbdevs.new 2012-06-03 18:26:22.000000000 +0200 @@ -2992,2 +2992,3 @@ product SIERRA E6892 0x6892 E6892 +product ????? ????? ????? ????? product SIERRA E6893 0x6893 E6893
Place it under “/home/pfsense/tools/patches/RELENG_8_3”.
Edit “/home/pfsense/tools/builder_scripts/patches.RELENG_8_3” and add “~~broadband.diff” below “~~huawei_k4505.diff”.
Proceed with step 5.3 (run “./build_iso.sh”) to build the images. The build process will fail the first time, perform a cleanup and re-run “./build_iso.sh”
That will re-fetch the kernel sources, re-apply the patches (including “broadband.diff”) and build the images.
It should work for all Sierra and Novatel devices, and for the majority of HUAWEI and ZTE devices.