Installing usb_modeswitch on pfSense 2.4.3

Updated instructions for getting a Huawei modem to work under pfSense
June 14, 2018
pfsense freebsd

The only instructions I could find on how to switch a Huawei USB modem from mass storage to network referenced pfSense 2.3 and had links for FreeBSD 10. The latest version of pfSense (at the time of writing) is based on FreeBSD 11, so the install returned the following:

[2.4.3-RELEASE][root@pfSense.localdomain]/tmp: pkg add usb_modeswitch-2.2.5.txz
Installing usb_modeswitch-2.2.5...
pkg: wrong architecture: FreeBSD:10:amd64 instead of FreeBSD:11:amd64

Failed to install the following 1 package(s): usb_modeswitch-2.2.5.txz

This will not do.

I dug around in the packages for FreeBSD 11 and found, which installed without any issues. Since I’m rebuilding my Internet-connected firewall, I had to pull this down directly to my laptop with wget and then scp it over to the firewall, putting it in /tmp. Once there, I installed it with pkg add from an SSH session to the firewall.

The latest version of usb_modeswitch is intelligent enough to automatically switch the device when it’s connected (or on boot) if you add the parameters to `/usr/local/etc/usb_modeswitch.conf’.

For my Huawei E8372, the additional configuration looks like this:


I added CheckSuccess with a reasonable timeout because manual testing showed that it never received a response. I don’t want the boot process to hang forever, waiting for a response that will never come.

The rest of that forum post is awful. Putting config files in /usr/local/sbin and adding additional, unneeded startup scripts into /etc/rc.d are all the hallmarks of someone thrashing about with no knowledge.

The only other takeaway from that post that is helpful is that you temporarily need to assign 2 NICs to pfSense in order for it to get past the interface assignment screen. If you initially add a WAN port without a DHCP server, you can also expect to have a long timeout while it waits for DHCP to fail.

Your total workflow looks like this: