-
I'm trying to set up pfSense on a ThinkPad T60 for test purposes with the idea of using a Huawei E3372 Hilink USM modem to provide the WAN link. I need to install and run usb_modeswitch so that I can enable ue0 which will be the WAN port.
Any advice on how I can achieve this would be appreciated.
-
Are you sure you need usbmodeswitch? It's not in hilink mode by default? It can't be switched via some other method like ejecting a virtual cd or permanently changed in Windows?
You can install it using 'pkg add' from the FreeBSD 11 repo directly but it may have dependencies and they may break something in pfSense so it would be a good idea not to do that if you don't have to.
Steve
-
Are you sure you need usbmodeswitch? It's not in hilink mode by default?
SteveNo it isn't in Hilink mode, it is recognised as a storage device. I need to run usb_modeswitch to convert it to an ethernet device.
See https://forums.freebsd.org/threads/usb-errors.65656/
I'm trying to figure out how to get devd to run usb_modeswitch when the modem is inserted…. Don't know if that is possible....
... maybe a change to /etc/devd.conf or /etc/devd/usb.conf could initiate such an action. -
Ok well since it appears as a virtual CD did you try ejecting it? That's the standard method for switching to modem mode.
/sbin/camcontrol eject cd0
If that does work you can run it at boot with a shellcmd. Do you actually need it to run on every insertion?
You will have an issue though because until you do that ue0 does not exist so it will fail the interface check at boot.
Steve
-
I'm trying to pinpoint the source of the interface check and maybe create a different action depending on what is being checked, but finding out how devd works is not easy….
-
You can add ue to the list of interfaces to ignore, it already ignores ppp, vlan etc as they are not present until the parent interface is configured. However that leaves things in an undefined state.
Did you try ejecting it?
Steve
-
Ok well since it appears as a virtual CD did you try ejecting it? That's the standard method for switching to modem mode.
/sbin/camcontrol eject cd0
I've just tried re-inserting the modem to see what appears…
camcontrol devlist shows
(pass1, cd0)
(pass3, da0)lsusb show the modem in Mass Storage mode.
camcontrol eject cd0 reports that the unit stopped successfully and media ejected,
camcontrol devlist and lsusb show the same as before.
Running usb_modeswitch returns
cdce0: <cdc ethernet="" control="" model="" ecm="">on usbus4
ue0: <usb ethernet="">on cdce0Now ifconfig shows ue0 as an available interface.
If that does work you can run it at boot with a shellcmd. Do you actually need it to run on every insertion?
You will have an issue though because until you do that ue0 does not exist so it will fail the interface check at boot.
Steve
The main problem would be at boot time with the USB modem present… How would I invoke this 'shellcmd'.
I need to be at the box to remove or insert the modem so I can easily run usb_modeswitch manually.</usb></cdc>
-
Install the shellcmd package, add whatever commands you need.
https://doc.pfsense.org/index.php/Executing_commands_at_boot_time
Really though you'd be much better off using a different modem. Either an external device that provides a real Ethernet interface or something that you can connect with over ppp, if the speed is not an issue.
Steve
Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.