Force BBB<->BBB to use RNDIS

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.

2026-01-12T10:43:28.895684-06:00 dbssystem kernel: [   44.073396] cdc_ncm 1-1:1.2 usb2: register 'cdc_ncm' at usb-musb-hdrc.1-1, CDC NCM, 7a:64:5e:02:c4:83
2026-01-12T10:43:31.171727-06:00 dbssystem kernel: [   46.349879] rndis_host 1-1:1.0 usb3: register 'rndis_host' at usb-musb-hdrc.1-1, RNDIS device, 8a:63:76:48:82:50

But the 2nd time it detects it the other way around.

2026-01-12T10:45:26.198345-06:00 dbssystem kernel: [  107.076459] rndis_host 1-1:1.0 usb2: register 'rndis_host' at usb-musb-hdrc.1-1, RNDIS device, ba:bd:d0:4d:50:18
2026-01-12T10:45:26.238256-06:00 dbssystem kernel: [  107.116299] cdc_ncm 1-1:1.2 usb3: register 'cdc_ncm' at usb-musb-hdrc.1-1, CDC NCM, 7a:64:5e:02:c4:83

Is there a way to force usb0(BBB#1)/usb2(BBB#2) to be RNDIS to fix this issue?

I believe udev could be used for that exact purpose.

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..

it’s started by /usr/bin/bb-start-usb-gadgets

thank you so much! works perfect!

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
#usb2.network
[Match]
Name=usb2

[Network]
Bridge=br0
  • Modify /etc/systemd/network/eth0.network to be used for bridge
#/etc/systemd/network/eth0.network
[Match]
Name=eth0

[Network]
Bridge=br0

On BBB#2(USB connected)

  • Comment out every line in the file Robert linked above that has “NCM” in it on BBB#2(one that is connecting via USB)
  • Modify /etc/systemd/network/usb0.network to use your desired IP(instead of 192.168.7.2)
#/etc/systemd/network/usb0.network EXAMPLE

[Match]
Name=usb0

[Network]
Address=192.168.2.176/23
Gateway=192.168.2.252
DNS=8.8.8.8

1 Like

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 …

There is the ‘old’ load g_xyz module.. They are fixed function..

Regards,

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?

before libcomposite was pushed mainline, we used g_multi:

g_multi: Making sure you're not a bot!

Regards,

Ah yes - I forgot that, a long time ago …. And yes the new drivers over usb are better.