RobertCNelson / linux-dev

MIT License
151 stars 96 forks source link

Beaglebone Black with Xenial : double USB eth bridge #44

Open goeland86 opened 7 years ago

goeland86 commented 7 years ago

Hi Robert,

First, big props for making the Ubuntu images for the Beaglebone - I use them as a base to build the Umikaze2 images for Replicape-powered 3D printers.

I'm trying to build an image of Umikaze which will work equally on the regular ethernet variant of the BBB, and on the newer wireless board. With the default kernel shipping it works fine (4.4.59-ti-r96). However since the 16.04.2 release, I've noticed that there are now two USB-ethernet interfaces showing up! usb0 on 192.168.7.2 as expected usb1 on 192.168.6.2 where I suspect hostapd being at fault.

For Umikaze we prefer using network-manager through the command line (nmtui) instead of connman so the script changes that part of the setup but usb1 is still present after reboot.

I've looked quite a bit in the /etc/interfaces* files but could find no reference to 192.168.6.2... How do I disable it?

I get the same issue with the wireless board, so it's consistent at least.

RobertCNelson commented 7 years ago

@goeland86 the dual interfaces is a new development, usb0 is rndis (with windows patches, so windows 7 -> 10 no longer need a 3rd party "signed" driver, instead it uses a microsoft default), usb1 is usb-cdc for MacOSX users, so they don't need a "signed" driver. For us linux users, we now have two connections.. ;)

You can kill it outright via:

sudo systemctl stop generic-board-startup.service
sudo systemctl disable generic-board-startup.service

That's the systemd script that calls:

https://github.com/RobertCNelson/boot-scripts/blob/master/boot/generic-startup.sh https://github.com/RobertCNelson/boot-scripts/blob/master/boot/am335x_evm.sh

(linking to the scripts encase you utilize part of the startup routine)

Regards,

RobertCNelson commented 7 years ago

The second interface get's created here:

https://github.com/RobertCNelson/boot-scripts/blob/master/boot/am335x_evm.sh#L510-L512 and kill this var: https://github.com/RobertCNelson/boot-scripts/blob/master/boot/am335x_evm.sh#L549

Regards,

RobertCNelson commented 7 years ago

and here:

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

it would be nice to modify the usbconfig block with 4 if sections, usb0/usb1/usb-flash/usb-serial

Regards,

goeland86 commented 7 years ago

Many thanks @RobertCNelson, also for the background as to why they were included in the first place!

I'll poll among our users to see if there's a need to keep both of them or if I can disable the usb-cdc... My guess is that it's a mixed bag... At least now I understand why it happens and where to look for the interface changes.

ferrarimarco commented 6 years ago

Thanks @RobertCNelson I see that generic-startup.sh and am335x_evm.sh initialize other things besides usb0 and usb1. Is there a parameter to disable just the configuration of those network interfaces and possibly the usb mass storage?

Edit: here is the code that I think manages the configuration of usb0 and usb1 https://github.com/RobertCNelson/boot-scripts/blob/master/boot/am335x_evm.sh#L713-L723