Having pfSense Recognize a USB Ethernet Adapter at boot time...
-
Dear forum,
I have salvaged a dumped VXL Itona Thin client from 2011 and modified it so it could accept a 2.5" sata hdd instead of the standard 128Mb IDE flash drive.
I also upgraded RAM from 256Mb to the maximum allowed, i.e. 2Gb.The motherboard is a Gigabyte M7CN896IDK and runs a Via C7 1Ghz 32bit single core processor.
It has a VIA VT6122 Gigabit Ethernet chip.
I'm trying to use a TP-LINK UE300 USB Ethernet adapter as a second NIC (Realtek RTL8153).I installed pfSense v2.1.5 (apparently this is the last 32bit version available)
At boot time the nic is recognized as a usb device :
ugen4.2 <TP-LINK> at usbus4 (disconnected))pfSense recognizes the adapter when I call the "Assign Interfaces" main menu item
I can then set it up and use it correctly.
The nics are named vge0 and ue0But at each reboot, I get the following message :
Warning: Configuration references interfaces that do not exist: ue0 Network interface mismatch -- Running intreface assignment option. vge0: link state changed to DOWN vge0: link state changed to UP Valid interfaces are : vge0 00:60:72:24:3e:5c (up) VIA Networking Velocity Gigabit Ethernet Do you want to set up VLANs first? etc... etc...
I then have to assign again the nics (vge0 to the WAN interface, (ue0 is apparently not know at this time).
Once this is done, I see the ue0 interface appearing :
Writing configuration...//......//...done. Updating configuration...done. Cleaning Backup cache...done. Setting up extended sysctls...done. cdce0: <CDC Communications Control> on usbus4 ue0: <USB Ethernet> on cdce0
I then have to assign again ue0 to my LAN.
I tried modifyng the /boot/loader.conf.local file with the following :
usb_quirk_load="YES" hw.usb.quirk.0="0x2357 0x0601 0 0xfff UQ_CFG_INDEX_1"
0x2357 is the vendor id
0x0601 is the device id
It does not work.I also installed the shellcmd package and added the earlyshellcmd command :
usbconfig -d 4.2 set_config 1
It does not work.
I also created a script "usr/local/etc/rc.d/tplink.sh" , with the same command as in the earlyshell config :
usbconfig -d 4.2 set_config 1
To no avail.
At boot time it does not load the driver...
Any ideas please ?Thank you very much for any help !
-
2.1.5 is really ancient! You should be using 2.3.5 on that if you must run 32bit.
The ue0 adapter should be initialised before the interface check preventing that issue. However USB NICs are often flawed in some way, it's recommended to avoid them if at all possible.
Steve
-
@stephenw10
Thank you for your reply !
I only found the latest 2.1.5 as a livecd which I could install.
I found it here :
http://mirror.transip.net/pfsense/downloads/I tried version 2.3.4 i386 but i dit not find a way to install it (I'm a unix noob...) it could only boot it from the iso...
-
@acanicio said in Having pfSense Recognize a USB Ethernet Adapter at boot time...:
I only found the latest 2.1.5 as a livecd which I could install.
I found it here :
http://mirror.transip.net/pfsense/downloads/I tried version 2.3.4 i386 but i dit not find a way to install it (I'm a unix noob...) it could only boot it from the iso...
pfSense ins't hiding on the net.
Download your ISO from here https://www.pfsense.org/download/ or, knowing that you have at least one USB port, take the memstick installer.
And before you ask : make a memstick.Btw : newer kernels, like FreeBSD in this case, have always better USB stuff support. I'm pretty sure you're running into troubles because you use old stuff.
I could fire up Google once more to show you the forum post where the same question was asked, and solved : "USB NIC not recognized on boot so absent when NIC's are set up, forcing the "Assing menu" to show up after every boot.Also : use an UPS and your system won't (re) boot anymore ^^
You probably knew this already : keeping up with old software on old devices using new technology (your USB NIC) == a lot of work ...
-
There are no longer any 32bit images available directly from us. They are all obsolete and considered insecure.
You should be able to upgrade still from ealier versions but it's been a very long time since I tried 2.1.X.
If it boots the ISO you should see the option to hit 'I' to install during the boot at the console.
Really though you should find some 64bit hardware to use and you should avoid USB Etheret.
Steve
-
@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
-
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
-
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 -
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
-
@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 : -
@gertjan I guess that works too. I like to live in shell land. But for everyone else, that's probably the way to go
-
@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 to0.3
and0.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.
-
This seems to have been fixed in the latest (
2.5.2
) release. Spent ages trying to diagnose it, but once I disabled theshellcmd
command I entered (and replaced the adapter with a new one as this one may have been killed), everything works beautifully again. -
@cybermancer Muito obrigado, exatamente! Thank you!
-
@cybermancer Hy cybermancer i'm in this case to. Could you explain your operating mode for the script?