# USB to Ethernet interface not getting fully enabled



## raghavan (Jan 31, 2019)

Hi I am very new to FreeBSD OS.
I am using FreeBSD 10.4( I have to use this version only), I am enabling the usb to ethernet Interface using ipmitool.
after enabling I see  
like this 

```
#ifconfig
ue0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 3a:5e:5d:ce:15:fa
        hwaddr 3a:5e:5d:ce:15:fa
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
```
dmesg

```
fbsd kernel: usbd_set_config_index: could not read device status: USB_ERR_STALLED
fbsd kernel: ugen0.6: <Linux 3.14.35 with pilot4hubudc RNDISEthernet Gadget> at usbus0
fbsd kernel: urndis0: <RNDIS Communications Control> on usbus0
fbsd kernel: ue0: <USB Ethernet> on urndis0
fbsd kernel: ue0: Ethernet address: 3a:5e:5d:ce:15:fa
fbsd devd: Executing '/etc/pccard_ether ue0 start'
fbsd devd: Executing '/usr/libexec/hyperv/hyperv_vfattach ue0 0'
fbsd devd: Executing 'logger Unknown USB device: vendor 0x0624 product 0xa4a2 bus uhub1'
fbsd root: Unknown USB device: vendor 0x0624 product 0xa4a2 bus uhub1
```


```
[root@fbsd ~]# kldstat
Id Refs Address            Size     Name
 1   48 0xffffffff80200000 18c59e8  kernel
 2    1 0xffffffff81ac6000 9b60     if_cdce.ko
 3    4 0xffffffff81ad0000 5a28     uether.ko
 4    1 0xffffffff81ad6000 113a8    ipmi.ko
 5    2 0xffffffff81ae8000 3210     smbus.ko
 6    1 0xffffffff81aec000 8b58     if_urndis.ko
 7    1 0xffffffff81af5000 5ee0     if_ipheth.ko
 8    1 0xffffffff81de6000 a6df     linprocfs.ko
 9    3 0xffffffff81df1000 7566     linux_common.ko
10    1 0xffffffff81df9000 b268     tmpfs.ko
11    1 0xffffffff81e05000 3652     ums.ko
12    1 0xffffffff81e09000 3d0b3    linux.ko
13    1 0xffffffff81e47000 37e1a    linux64.ko
[root@fbsd ~]#
```
I am not able bring it up and set an IP address, can someone please guide me what am  I missing.
Thanks


----------



## SirDice (Jan 31, 2019)

raghavan said:


> I am using FreeBSD 10.4


FreeBSD 10.4 has been End-of-Life since October 2018 and is not supported any more.
Topics about unsupported FreeBSD versions








						Unsupported FreeBSD Releases
					

FreeBSD is an operating system used to power modern servers, desktops, and embedded platforms.




					www.freebsd.org
				






> ( I have to use this version only)


This begs the question, why?


----------



## raghavan (Feb 1, 2019)

SirDice said:


> FreeBSD 10.4 has been End-of-Life since October 2018 and is not supported any more.
> Topics about unsupported FreeBSD versions
> 
> 
> ...


This is what currently customer is using , so I can not move to next version. please some pointers also ok


----------



## raghavan (Feb 1, 2019)

raghavan said:


> FreeBSD 10.4


I tried in 12.0 also, behaviour is same , at least can you help please


----------



## SirDice (Feb 1, 2019)

What is the make and model of the USB device. 



raghavan said:


> I am enabling the usb to ethernet Interface using ipmitool.


Explain this please. How and what did you do?


----------



## Eric A. Borisch (Feb 1, 2019)

I'm not sure what ipmitool(1) has to do with bringing this interface up; it has commands for adjusting an IPMI network interface; this is not one.

Does something like `ifconfig ue0 x.x.x.x/nn up` work?


----------



## ralphbsz (Feb 2, 2019)

The "USB Ethernet" device being discussed here is probably not a real ethernet device.  My hunch comes from the name "RNDIS": it is probably a Raspberry Pi, pretending to be a USB-to-ethernet adapter.  This is a very useful (but very bizarre!) feature of newer RPi firmware: to allow installing a virgin Pi, it can pretend to be a serial or ethernet adapter on its USB port (instead of being a USB host), which allows initializing it just by plugging it into a laptop.  But note that the RPi is not actually an ethernet or serial device, because it terminates in the RPi firmware.

The problem with this is that the RPi firmware is a quite restricted and probably buggy USB device.  I've used this at home to dial into some of my Pis, using a Mac (which required some bizarre actions too, I don't remember the details, but it took a while).  The USB implementation is probably good enough to work with common OSes, and probably hasn't been tested with FreeBSD.

If that's it: Try using a different OS.  If it is something different: We need more information about the exact USB device to help debug.


----------



## tingo (Feb 3, 2019)

Vendor 0x0624 is Apex, so I don't think it is a Raspberry Pi. Apex PC Solutions seems to make KVM stuff https://www.connection.com/search/apex-pc-solutions/4294959136


----------



## raghavan (Feb 4, 2019)

Eric A. Borisch said:


> I'm not sure what ipmitool(1) has to do with bringing this interface up; it has commands for adjusting an IPMI network interface; this is not one.
> 
> Does something like `ifconfig ue0 x.x.x.x/nn up` work?


Thanks for your Reply,
if config Up does not work, and I am not able to set any IP address also. If I do dhclient ue0 ,
LOg is
****
[root@fbsd ~]# dhclient ue0
DHCPDISCOVER on ue0 to 255.255.255.255 port 67 interval 6
receive_packet failed on ue0: Device not configured
Interface ue0 no longer appears valid.
No live interfaces to poll on - exiting.
exiting.
*****
on the BMC side(ethernet Interface side interface after enabling usb -to Ethernet interface
******
usb0  Link encap:Ethernet  HWaddr 36:1A:57:28:07:AE
          inet addr:169.254.254.1  Bcast:0.0.0.0  Mask:255.255.255.0
          inet6 addr: fe80::341a:57ff:fe28:7ae/64 Scope:Link
          inet6 addr: fe80:4044::1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:220517 errors:0 dropped:0 overruns:0 frame:0
          TX packets:92017 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:254708270 (242.9 MiB)  TX bytes:6131299 (5.8 MiB)
******


----------



## raghavan (Feb 4, 2019)

ralphbsz said:


> The "USB Ethernet" device being discussed here is probably not a real ethernet device.  My hunch comes from the name "RNDIS": it is probably a Raspberry Pi, pretending to be a USB-to-ethernet adapter.  This is a very useful (but very bizarre!) feature of newer RPi firmware: to allow installing a virgin Pi, it can pretend to be a serial or ethernet adapter on its USB port (instead of being a USB host), which allows initializing it just by plugging it into a laptop.  But note that the RPi is not actually an ethernet or serial device, because it terminates in the RPi firmware.
> 
> The problem with this is that the RPi firmware is a quite restricted and probably buggy USB device.  I've used this at home to dial into some of my Pis, using a Mac (which required some bizarre actions too, I don't remember the details, but it took a while).  The USB implementation is probably good enough to work with common OSes, and probably hasn't been tested with FreeBSD.
> 
> If that's it: Try using a different OS.  If it is something different: We need more information about the exact USB device to help debug.


Thanks for the reply, It is not RPI, it is a  BMC( Base board Magmt controller OS) one side (Ethernet SIde) and USB in the FreeBSD side.


----------



## raghavan (Feb 4, 2019)

tingo said:


> Vendor 0x0624 is Apex, so I don't think it is a Raspberry Pi. Apex PC Solutions seems to make KVM stuff https://www.connection.com/search/apex-pc-solutions/4294959136


it is Avocent product, 
to be noted I saw in the Vendor/Manufacturer list(FreeBSD site) and also in /etc/devd/usb.conf , Avocent (0x0624) is not listed, does that mean we have to write Our own driver for this ?


----------



## raghavan (Feb 4, 2019)

ralphbsz said:


> f that's it: Try using a different OS. If it is something different: We need more information about the exact USB device to help debug.


I Used Cent OS , it works , drivers loaded are "usbnet,mii and cdc_ethernet"


----------



## raghavan (Feb 4, 2019)

SirDice said:


> What is the make and model of the USB device.
> 
> 
> Explain this please. How and what did you do?


I am having BMC OS one side (ethernet side) using ipmitool I have to enable the interface from Host side(FreeBSD) using ipmitool cmd , this is Avocent product with link: http://www.linux-usb.org/usb.ids


----------



## ralphbsz (Feb 4, 2019)

Your best bet: Post this on the developer mailing lists.  Clearly, your ethernet interface is not "supported" in the sense of working out of the box, so this will require work.

Failing that: if you search the web for "vendor 0x0624 product 0xa4a2", you find some matches in Fedora configuration files.  So it seams that some Linux drivers know about this product.  That matches your experience with it working in CentOS.  Maybe you could use this as a guide?  It is quite possible that your hardware would work with one of the existing FreeBSD USB ethernet drivers, but none are willing to try, because this vendor/product combination is not in their list of supported hardware.  There are only roughly a dozen of USB ethernet drivers: you just have to figure out which one might work.  This might be possible by looking at the Linux USB configuration files, and finding which other chips share the same driver in Linux.  Then search the FreeBSD source code for those other chips, and try those drivers first.  Unfortunately, I don't know a way to convince a FreeBSD USB driver to attach to a random chip it doesn't recognize, other than going into the source code (like if_udav.c), updating the list of supported hardware, recompile and reload, and iterate.  For someone with kernel development experience, this is not a lot of work.


----------



## Deleted member 30996 (Feb 5, 2019)

I wanted to re-purpose one of my Thinkpads into a FreeBSD firewall/router but would need another network card to make it happen. The Thinkpad Thaumaturge I turn to for transcendent thought tagged this as the ticket:



			https://www.amazon.com/StarTech-com-ExpressCard-Gigabit-Ethernet-Network/dp/B003N3G1BI/
		


Comments indicate someone got it working with pfSense but Phishfry wasn't impressed with the quality and it wasn't really what I had in mind, having ran a pfSense tower. I was hoping a slot could be made available for another network card and the rest standard routing:









						FreeBSD Router
					

So, my ISP uses a Coaxial Cable Modem/Router combo. Said combo costs me $20 a month, which does not make me happy considering I've had it for multiple years now. Would it be possible for me to use a FreeBSD setup somehow instead of said combo? Or would I still have to use some form of Docsis 3.0...




					forums.freebsd.org
				




I would much prefer it to my Netgear but put it on the back burner for now, not short of things that need done.


----------



## raghavan (Feb 5, 2019)

ralphbsz said:


> Your best bet: Post this on the developer mailing lists.  Clearly, your ethernet interface is not "supported" in the sense of working out of the box, so this will require work.
> 
> Failing that: if you search the web for "vendor 0x0624 product 0xa4a2", you find some matches in Fedora configuration files.  So it seams that some Linux drivers know about this product.  That matches your experience with it working in CentOS.  Maybe you could use this as a guide?  It is quite possible that your hardware would work with one of the existing FreeBSD USB ethernet drivers, but none are willing to try, because this vendor/product combination is not in their list of supported hardware.  There are only roughly a dozen of USB ethernet drivers: you just have to figure out which one might work.  This might be possible by looking at the Linux USB configuration files, and finding which other chips share the same driver in Linux.  Then search the FreeBSD source code for those other chips, and try those drivers first.  Unfortunately, I don't know a way to convince a FreeBSD USB driver to attach to a random chip it doesn't recognize, other than going into the source code (like if_udav.c), updating the list of supported hardware, recompile and reload, and iterate.  For someone with kernel development experience, this is not a lot of work.


Thanks for the reply and suggestion,
I will try to post in developer mailing list, can you please tell me how to I post in developer mailing list


----------



## SirDice (Feb 5, 2019)

Mailing Lists | The FreeBSD Project
					

FreeBSD is an operating system used to power modern servers, desktops, and embedded platforms.




					www.freebsd.org


----------

