Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs

Dashboard
Notifications
Mark all as read
Q&A

How to use a detected USB RNDIS gadget as network adapter

+2
−0

I have a RaspberyPi module, with USB connected to another module computer (as USB host) running Linux. The RasPi is configured as USB ethernet gadget.

Once I boot the RasPi, and enter dmesg on the host computer, I see:

[ 2918.753649] usb 1-1: Product: RNDIS/Ethernet Gadget

So the Raspi is detected as gadget on the USB host computer.

But unlike a previous experiment, where I used another RaspberryPi as the host, where it also detected the 1st raspi as gadget and created a usb0 network adapter and assigned an IP configuration to it, this is not the case here. No usb-anything under ifconfig -a. Not listing it with the -a option means that no network device usb0 exists, configured or not?

My current host computer runs a rather down-sized Linux based on buildroot/busybox.

Is there a certain configuration missing that allows using this detected RNDIS gadget for network - which just happens to be done automatically on the default Raspi Linux distribution - but not necessarily on others?

Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

0 comment threads

1 answer

+1
−0

I was looking through the unpacked file that I find in /proc/config.gz on the host system.

There was: # CONFIG_USB_NET_DRIVERS is not set

What I also found is that, the host side counterpart to the gadget device's g_ether driver, is supposedly the cdc_ether driver. I found mentions of CONFIG_USB_NET_CDCETHER , CONFIG_USB_USBNET and other USB_NET options that supposedly need to be onm in other posts elsewhere. My config file does not contain that text except for the mentioned CONFIG_USB_NET_DRIVERS - but apparently, dependant options of a main option are not always also put into the config text file.

Generating a new kernel image, with the following items added to the kernel configuration, helped, and I now get a "usb0" interface shown under ifconfig -a :

  • CONFIG_USB_NET_DRIVERS
  • CONFIG_USB_USBNET
  • CONFIG_USB_NET_CDCETHER
  • CONFIG_USB_NET_CDC_EEM

next to options generally enabling USB and enable it as a host (or dual role). I'm not sure whether the last one is necessary, haven't tried. Its description sounded like it could be relevant, as it mentions a usbX interface name, which I knew from the Raspi4-as-host experiment.

Why does this post require moderator attention?
You might want to add some details to your flag.

0 comment threads

Sign up to answer this question »

This community is part of the Codidact network. We have other communities too — take a look!

You can also join us in chat!

Want to advertise this community? Use our templates!