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

    Auto execute usbconfig at boot to enable USB NIC

    Scheduled Pinned Locked Moved Hardware
    2 Posts 2 Posters 314 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.
    • G
      Grillmeister
      last edited by

      Hi everyone!

      In order to enable the system to automatically reboot and startup properly after a shutdown
      I would like to execute the following command usbconfig -d ugen0.2 set_config 1 everytime the system boots.

      I tried to include something like this <shellcmd>usbconfig -d ugen0.2 set_config 1<shellcmd> right above <system> in the config.xml file. However it triggered lots of errors during boot so that I had to remove the line again.

      Any help is very much appreciated. Thanks Grillmeister

      PS. I know that USB NICs are not a prefered solution but I need to stick with them because of the lack of alterntives for my Intel NUC.

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

        You probably can do something like that but FreeBSD has a better solution built in for setting the config index on a device:
        https://www.freebsd.org/cgi/man.cgi?query=usb_quirk#LOADER_TUNABLE

        So get the product and vendor IDs from your device using usbconfig -d ugen0.2 dump_device_desc then create the file /boot/loader.conf.local and add to it:

        hw.usb.quirk.0="VID PID 0 0xffff UQ_CFG_INDEX_1"
        

        Then that device will always come up with config index 1 whenever it's attached.

        Steve

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