I’m trying to pass through my ethernet connection from 1 bbb to another using a USB A to USB MINI cable. I’ve created a bridge(br0) on BBB#1 to combine eth0 with usb2(which corresponds to usb0 on BBB#2) shows up when i connect BBB#2 using a usb cable. I then changed usb0 ip on BBB#2 to my desired IP. So i have 2 bbbs, 1 with ip 192.168.2.150 and the other with 192.168.2.151.
Network ↔ ETH0(BBB #1) ↔ USB A(BBB #1) ↔ USB Mini(BBB #2)
The problem is that the first time I plug BBB#2 into BBB#1, it doesn’t work. As soon as i unplug the bbbs from each other and reconnect them, it works perfect. Only thing I can see is that the first time, BBB#1 detects BBB#2 usb2 as CDC_NCM and usb3 as RNDIS.
Newer images remove rndis for the usb ports, here’s the old script that is used to load RNDIS usb0 and NCM on usb1… in your case, you should modify it for only RNDIS on each device..
I was trying to delete /sys/kernel/config/usb_gadget/g_multi/functions/ncm.usb0 and /sys/kernel/config/usb_gadget/g_multi/configs/c.1/ncm.usb0 manually and wondering why they came back after a reboot… that script explains why..
Adding my config files for anybody that stumbles upon this post in the future..
To accomplish the goal
On BBB#1(Ethernet connected)
Create the following files and place in /etc/systemd/network/
#br0.netdev
[NetDev]
Name=br0
Kind=bridge
#br0.network EXAMPLE
[Match]
Name=br0
[Network]
Address=192.168.2.175/23
Gateway=192.168.2.252
DNS=8.8.8.8
Yes its one think I don’t like about the linux configfs - is that it order the define what appears on the USB port, you have to write to the virtual kernel file system. It means you need a script that creates the right file structure before bringing up the functions on the USB port, and this is what the beagle image does (and everyone else that wants multiple functions on the usb). Alas I don’t think there is currently a better method …
Thought they only brought up a single interface on USB, so if you wanted ethernert+ uart + memory stick - you were forced to use libcomposite and the configfs solution?