Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Ue0 for WAN

    Scheduled Pinned Locked Moved Problems Installing or Upgrading pfSense Software
    8 Posts 2 Posters 2.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      Balanga
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by

        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

        1 Reply Last reply Reply Quote 0
        • B
          Balanga
          last edited by

          @stephenw10:

          Are you sure you need usbmodeswitch? It's not in hilink mode by default?
          Steve

          No 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.

          1 Reply Last reply Reply Quote 0
          • stephenw10S
            stephenw10 Netgate Administrator
            last edited by

            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

            1 Reply Last reply Reply Quote 0
            • B
              Balanga
              last edited by

              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….

              1 Reply Last reply Reply Quote 0
              • stephenw10S
                stephenw10 Netgate Administrator
                last edited by

                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

                1 Reply Last reply Reply Quote 0
                • B
                  Balanga
                  last edited by

                  @stephenw10:

                  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 cdce0

                  Now 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>

                  1 Reply Last reply Reply Quote 0
                  • stephenw10S
                    stephenw10 Netgate Administrator
                    last edited by

                    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

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post
                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.