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
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

How to use a detected USB RNDIS gadget as network adapter

+3
−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?

History
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

+2
−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.

History
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 »