how to add USB ethernet dongle

I want add a USB ehternet adapter, and I can;t figure out the correct steps. I have found anything really helpful yet online.
I power off the BBB, plug in the usb ethernet dongle and then power up the BBB>

If I run dmsg |grep eth1 it shows me the following:

root@BB2:/etc/network# dmesg |grep eth1
[ 7.182673] smsc75xx 1-1.4.2:1.0 eth1: register ‘smsc75xx’ at usb-musb-hdrc.1.auto-1.4.2, smsc75xx USB 2.0 Gigabit Ethernet, 00:0e:c6:89:39:7c

If run ifconfig I don’t see an entry for eth1.

root@BB2:/etc/network# ifconfig
eth0 Link encap:Ethernet HWaddr 6c:ec:eb:a5:88:d0
inet addr:192.168.1.110 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::6eec:ebff:fea5:88d0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:29178 errors:0 dropped:0 overruns:0 frame:0
TX packets:2495 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3523159 (3.3 MiB) TX bytes:430835 (420.7 KiB)
Interrupt:40

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

usb0 Link encap:Ethernet HWaddr 22:4e:cb:68:46:59
inet addr:192.168.7.2 Bcast:192.168.7.3 Mask:255.255.255.252
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

my /etc/network/interfaces looks like this:

This file describes the network interfaces available on your system

and how to activate them. For more information, see interfaces(5).

The loopback network interface

auto lo
iface lo inet loopback

The primary network interface

#auto eth0
#iface eth0 inet dhcp

Example to keep MAC address between reboots

#hwaddress ether DE:AD:BE:EF:CA:FE

The secondary network interface

#auto eth1
#iface eth1 inet dhcp

WiFi Example

#auto wlan0

#iface wlan0 inet dhcp

wpa-ssid “essid”

wpa-psk “password”

Ethernet/RNDIS gadget (g_ether)

… or on host side, usbnet and random hwaddr

Note on some boards, usb0 is automaticly setup with an init script

iface usb0 inet static
address 192.168.7.2
netmask 255.255.255.0
network 192.168.7.0

gateway 192.168.7.1

What is the correct way to configure this?

Thanks

Pat

Anyone have a USB Ethernet adapter working as eth1?

If so what am I missing?

Pat

sudo ifconfig -a
sudo dhclient eth1

sudo ifconfig

Regards,

sudo ifconfig -a

root@beaglebone:~# sudo ifconfig -a
eth0 Link encap:Ethernet HWaddr 6c:ec:eb:a5:88:d0
inet addr:192.168.1.110 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::6eec:ebff:fea5:88d0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1906 errors:0 dropped:1 overruns:0 frame:0
TX packets:485 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:280446 (273.8 KiB) TX bytes:88032 (85.9 KiB)
Interrupt:40

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

rename3 Link encap:Ethernet HWaddr 00:0e:c6:89:39:7c
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

usb0 Link encap:Ethernet HWaddr 82:2c:1d:e4:14:ae
inet addr:192.168.7.2 Bcast:192.168.7.3 Mask:255.255.255.252
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

I see rename 3

Then:

root@beaglebone:~# sudo dhclient eth1
Cannot find device “eth1”
root@beaglebone:~#

I think I am missing a step but thanks so far for your help…
Whats next?

Ah yeah, your getting tripped up on a custom udev rule we have in
place to ensure "eth0" is always "eth0" even if you move cards around
to different beaglebone's..

Comment out this line from this file and reboot:

sudo nano /etc/udev/rules.d/70-persistent-net.rules

# BeagleBone: net device ()
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{dev_id}=="0x0",
ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

It would probally be better to update it for "DRIVERS=="cpsw"" but
this is going to bite use with the X15 down the road too..

Regards,

I had various issues trying to get usb networking going that ended up in a couple of lengthy blog posts. See here.

No it's fine now.. Notice how they both have the "ATTR{address}" now
populated. cpsw will always be eth0 and smsc75xx will always be eth1..

I had removed the "ATTR{address}" variable in my hack..

Regards,

Thansk to all I have if figured out now.

Pat

Btw, i pushed a commit to fix this going forward:

https://github.com/RobertCNelson/omap-image-builder/commit/7bd35d8b31bdfdf08662477a5271ade58f317669

Now, any "non" cpsw usb-ethernet devices should correctly get an eth1
id from udev..

Regards,