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

    Having pfSense Recognize a USB Ethernet Adapter at boot time...

    Scheduled Pinned Locked Moved Hardware
    15 Posts 6 Posters 11.6k 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.
    • A
      acanicio @Gertjan
      last edited by acanicio

      @Gertjan
      Hello, and thank you for your reply.

      I know pfSense is not hiding on the net, but I get a 403 error (Forbidden) when I tried to access the "old" folder in the pfSense download section.

      Finally I found pfSense CE 2.3.5 i386 on http://linorg.usp.br/pfsense/downloads/

      My VXL Itona does not accept booting from usb keys but accepts usb cd-rom drives.

      I use a a Zalmann ZM-VE300 external drive enclosure that emulates an optical drive from any ISO file that is stored in the hdd.
      With this great tool I don't use USB keys anymore.

      I found out that I could not install the software simply because it was not patient enough. It was taking so much time I kept on thinking it had crashed.

      So yesterday I waited a little longer and the "Install" option appeared finally 6 minutes after booting from USB.

      Installation went flawlessly, and as a miracle, my TP-Link UE300 was recognized at boot time after having installed the Shellcmd package and added the "usbconfig -d 4.2 set_config 1" command as earlyshell.

      I have completed both NICs' configuration and booted a couple of times without any problem.

      So it does seem that version 2.3.5 solves the issue.

      I finished at about 1AM last night, so I'll continue testing this evening when I get back from work.

      Thank you again for your effective help !

      P.S. I said I'm a "Unix" noob, not a computer noob... it's been my job for over 30 years and I almost never had the occasion to work on Unix based systems, only Bull mainframes (GCOS-7) and Windows Server platforms.

      I'm cannot stand seeing obsolete (but perfectly working) hardware being sent to the bin just because it's obsolete. So every time I can, I recover it for free and with a little soldering/modding/upgrading I find new uses for them.
      I have a couple of projects with these little thin clients (I salvaged 6 of them). One of them was making a decent firewall/proxy/router. This is now on the right path.

      The others will serve as video surveillance or automation control units for my future house. I managed to install Windows XP on them. They perfectly do the job with (also obsolete) salvaged usb webcams plugged in and home made software.

      Best regards

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

        Nice.

        You should be able to use the hw.usb.quirk loader variable to do that rather then a shellcmd. Did you try that in 2.3.5?

        Using the shellcmd does store it in the config file though.

        Steve

        A 1 Reply Last reply Reply Quote 0
        • A
          acanicio @stephenw10
          last edited by

          Dear @stephenw10,

          I had tried this in version 2.1.5.
          I will then try it in version 2.3.5 also.

          Thank you !

          Best regards
          Axel

          1 Reply Last reply Reply Quote 0
          • C
            Cybermancer
            last edited by Cybermancer

            I found a solution to this.

            In my setup, I use a script to determine the USB device in case it changes, but here is the gist of it.

            In the config.xml file, I added an entry at the end of the <system> block: <earlyshellcmd>usbconfig -d 0.2 set_config 1</earlyshellcmd>

            This means that when the system starts up, it enables the USB device, so that if you bind that Ethernet adapter to an Interface, it doesn't freak-out during boot and ask you to set up the interfaces again.

            The script I use does a grep to find the ugen address of the Realtek USB device, then passes that value into the -d argument.

            This has been tested with pfSense 2.5.1

            FYI, here is my script, I have a couple of Realtek adapters attached, so this adds all of them:

            #!/bin/sh
            IDs=$(usbconfig list | grep Realtek | sed -r 's/ugen([0-9]\.[0-9]).*/\1/')
            for ID in $IDs
            do
                    usbconfig -d $ID set_config 1
            done
            
            GertjanG S 2 Replies Last reply Reply Quote 1
            • GertjanG
              Gertjan @Cybermancer
              last edited by

              @cybermancer said in Having pfSense Recognize a USB Ethernet Adapter at boot time...:

              In the config.xml file, I added an entry at the end of the <system> block: <earlyshellcmd>usbconfig -d 0.2 set_config 1</earlyshellcmd>

              Editing manually ?
              What about the mini pfSense package :

              ea584dfc-e26d-4520-a2d1-fb8f4a3e2f50-image.png

              No "help me" PM's please. Use the forum, the community will thank you.
              Edit : and where are the logs ??

              C 1 Reply Last reply Reply Quote 2
              • C
                Cybermancer @Gertjan
                last edited by Cybermancer

                @gertjan I guess that works too. I like to live in shell land. But for everyone else, that's probably the way to go

                1 Reply Last reply Reply Quote 1
                • C
                  Cybermancer
                  last edited by Cybermancer

                  @acanicio Sorry, I gave your original post another read, and it seems that what I typed was similar to yours.

                  The script I wrote did initially fail after reboot, but now it seems to work fine (no idea why).

                  One thing I noticed that was extremely annoying was that when I booted up without a keyboard, the id was 0.2, but when I booted with a keyboard attached (regardless of the USB port used), the ID would change to 0.3 and 0.2 was taken by the keyboard.

                  Hopefully, that script should work as its a tad more dynamic. But I have 2 USB Ethernet adapters connected that seems to work perfectly over several reboots... I hope it holds out as the rest of the config applied would be an absolute pain to reload.

                  1 Reply Last reply Reply Quote 1
                  • C
                    Cybermancer
                    last edited by Cybermancer

                    This seems to have been fixed in the latest (2.5.2) release. Spent ages trying to diagnose it, but once I disabled the shellcmd command I entered (and replaced the adapter with a new one as this one may have been killed), everything works beautifully again.

                    D 1 Reply Last reply Reply Quote 2
                    • D
                      Danilo Souza Sampaio @Cybermancer
                      last edited by

                      @cybermancer Muito obrigado, exatamente! Thank you!

                      1 Reply Last reply Reply Quote 0
                      • S
                        soloviento @Cybermancer
                        last edited by

                        @cybermancer Hy cybermancer i'm in this case to. Could you explain your operating mode for the script?

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