Why two Ethernet over USB interfaces, usb0 and usb1?

967 views
Skip to first unread message

Tarmo Kuuse

unread,
Aug 31, 2017, 10:07:08 AM8/31/17
to BeagleBoard

Hi!

I've been reading the am335x_evm.sh & friends for a while and don't get it. Why are there two separate Ethernet over USB interfaces - eth0 and eth1 - doing the same exact thing? They both show up when I connect a BB to my Debian PC. 

Having no experience with gadget and libcomposite, I'd guess that RNDIS and CDC ECM are both required simultaneously to somehow support Windows/Mac/Linux users out of the box?

--
Kind regards,
Tarmo

Robert Nelson

unread,
Aug 31, 2017, 10:11:49 AM8/31/17
to Beagle Board, Tarmo Kuuse
So this is Windows and Apple's fault..

Windows = CDC ECM = needs signed driver..
Apple = RNDIS = needs signed driver...

Windows will use the RNDIS with a built-in driver, thus user doesn't
have to install anything...
Apple will use the CDC ECM with a built-in driver, thus user doesn't
have to install anything...

So in linux, we end with two interfaces, because Windows and Apple
don't have a unified built-in driver...

Regards,

--
Robert Nelson
https://rcn-ee.com/

Tarmo Kuuse

unread,
Aug 31, 2017, 10:15:45 AM8/31/17
to BeagleBoard, tarmo...@gmail.com
Fair enough, thanks for the explanation.

Since the comments in "autoconfigure_usb1.sh" say it's handling CDC/ECM, I assume that the other one (usb0) does RNDIS.

--
Kind regards,
Tarmo

Robert Nelson

unread,
Aug 31, 2017, 10:20:06 AM8/31/17
to Beagle Board, Tarmo Kuuse
it's only because we enable rndis first thus it becomes usb0:

https://github.com/RobertCNelson/boot-scripts/blob/master/boot/am335x_evm.sh#L503-L531

Tarmo Kuuse

unread,
Aug 31, 2017, 10:40:46 AM8/31/17
to BeagleBoard, tarmo...@gmail.com
Okaaaay ... /long blank stare/ ... I think I mostly get it now. 

The sysfs hierarchy groups them both under "functions/*.usb0" which is an excellent red herring :)

--
Tarmo

qie...@gmail.com

unread,
Sep 24, 2017, 2:19:02 PM9/24/17
to BeagleBoard
Okay, this answers my  question in another thread.  So now how do I disable one or the other?

Tarmo Kuuse

unread,
Sep 25, 2017, 9:38:39 AM9/25/17
to BeagleBoard
I'd go for hacking out either the rndis or ecm config from usb-gadget setup in am335x_evm.sh (see Robert's last post with highlighted lines). 

--
Kind regards,
Tarmo Kuuse

LongQi Zhang

unread,
Feb 2, 2020, 11:15:51 PM2/2/20
to BeagleBoard
Add `USB_NETWORK_CDC_DISABLED="yes"` to `/etc/default/bb-boot` to disable usb1 on linux
Reply all
Reply to author
Forward
0 new messages