Help needed! Forcing USB device on Configuration Index 1
-
Hello all,
First of all, I need to say that I am new to FreeBSD, but have a bit of general Linux knowledge and moderate networking skills.
I recently took the dive and got underway to setup a pfsense box for my home router. For now it is running on an old Dell Inspiron laptop, with unfortunately only 1 onboard NIC.
I will eventually buy and build a box for my pfsense router, but until then, this laptop will have to do. I bought a USB-ethernet adapter (apparently based off a Realtek 8153 USB3 gigabit chip) that was available locally and I can get it to work in pfsense.
However, for the USB adapter to work I have to force the USB driver to use its configuration index 1 (usbconfig -d 4.2 set_config 1). Then the device gets recognized by cdce0 and a ue0 interface gets assigned to this device.
When in set_config 0, the USB device weirdly gets recognized as an optical CD drive under umass0 drivers.
I was able to add a simple code to devd.conf that automatically sets the correct config upon attaching the NIC to the laptop.
notify 100 { match "system" "USB"; match "subsystem" "DEVICE"; match "type" "ATTACH"; match "vendor" "0x0bda"; match "product" "0x8153"; action "usbconfig -d $cdev set_config 1"; };
However, if I boot the laptop while the NIC is pluged in, the device does not get configured properly and so one of my interfaces does not go up. I tried adding some shellcmd performing 'usbconfig -d 4.2 set_config 1' in the config file, but it flips the device in config 255 instead and does not work.
With the devd modification, any time I unplug and plug the device it works 100%.
Any ideas how I can have the USB device be recognized properly during (ideally) or immediately after boot?
Thanks :)
-
Hi Spiltz,
Did you ever solve this?
I am in a similar situation with a Intel NUC with 1 internal NIC and have a 2 extra DELL USB-LAN Adapters built on the same chipset RTL8153 attached to USB3 ports.
I am not a Linux guy, so all help is very appreciated.Hoping for a reply,
Ase -
Hi All,
I tried to edit the devd.conf file from the shell using "vi" after starting pfSense but did not manage to do it right yet, complicated as hell.
Also tried to boot Hirens BootCD into Linux but that could not recognize the file system of the USB stick nor the HDD partition.
The same if I try to access the .img file or USB stick from within Windows.Any Linux distribution or Windows tools that I can use to edit the .img file or USB stick using a GUI?
Any plans for pfSense to include correct support for Realtek RTL8153 Chipset?Sorry for being such a newbie to Linux, I just got recommended to try "the best" firewall software, but did not know that the startup was this hard.
Any help forward is appreciated.
Thanks,
Ase -
I also have the RTL8153 and i'm looking for a way to make it work… any luck so far?
Or have you found another usb nic that is supported? im looking for a solution but it has to be usb...
-
Create VLAN for WAN and connect to a VLAN capable "smart" switch. Only one NIC required. Problem solved.
-
I also have the RTL8153 and i'm looking for a way to make it work… any luck so far?
Or have you found another usb nic that is supported? im looking for a solution but it has to be usb...
Hi sajansen,
No luck so far, I hoped the new 2.2.5 would fix the support for this device, but sadly no :(
//Ase
-
Create VLAN for WAN and connect to a VLAN capable "smart" switch. Only one NIC required. Problem solved.
Hi NOYB,
I know this could be a solution but I do not want to go this way.
Let us hope that future releases of pfSense will fix support for the network USBs.//Ase
-
Hello, i know it's an old topic but i found a way to solve this problem:
add a line in /boot/loader.conf:
hw.usb.quirk.0="idVendor idProduct 0 0xffff UQ_CFG_INDEX_1"
replacing idVendor and idProduct with the good values and you can choose another index as well: 0 1 2 3 …
you can get idVendor and idProduct with usbconfig
reboot and it's done
I hope it will help someone
-
I was able to solve it differently,
Using PfSense 2.4.0 was and changed the file in /conf/config.xml, according to the documentation https://doc.pfsense.org/index.php/Executing_commands_at_boot_time it is possible to add command when starting the system.
So my file looks like this:<pfsense><version>17.0</version> <lastchange></lastchange> <system><optimization>normal</optimization> <hostname>pfSense</hostname> <domain>localdomain</domain> <dnsallowoverride></dnsallowoverride> <earlyshellcmd>usbconfig -d 4.2 set_config 1</earlyshellcmd></system></pfsense>
Then when saving just delete the file in memory rm /tmp/config.cache as https://doc.pfsense.org/index.php/How_can_I_reload_the_config_after_manually_editing_config.xml
Now everytime I turn off or restart the modem, it is already up properly.
-
Using the loader usb quirk is generally a better solution since it will be applied whenever the device is detected. So if the modem is re-inserted during runtime for example.
But the value should go in /boot/loader.conf.local to ensure it survives an update. loader.conf may be re-written.
Steve