Skip to main content

Ethernet over USB [Resolved]

I am new to Yocto, playing with the core-minimal-image and trying to run it on my pocketbeagle. I would like to SSH into my pocketbeagle over the USB port. I know it is possible, as the default image provided for that board does exactly that.

I found a pocketbeagle-meta on github, and am using that to build. Looking at the kernel config, I see that it sets a bunch of USB-related options, i.e.:

CONFIG_USB_USBNET=m
CONFIG_USB_NET_AX8817X=m
CONFIG_USB_NET_AX88179_178A=m
CONFIG_USB_NET_CDCETHER=m
CONFIG_USB_NET_CDC_EEM=m
CONFIG_USB_NET_CDC_NCM=m

Flashing the default image and plugging it into my computer results in the board being powered, but my computer does not recognize any USB device (checking with dmesg, and nothing happens).

So I tried to load the cdc_ether kernel module, by adding:

KERNEL_MODULE_AUTOLOAD += "cdc_ether"

to core-image-minimal.bb, but that does not change anything.

What am I missing for my pocketbeagle to be recognized as an ethernet device through USB?


Question Credit: JonasVautherin
Question Reference
Asked September 19, 2019
Tags: yocto
Posted Under: Unix Linux
20 views
1 Answers

I finally learned that cdc_ether is for the host-side of the USB (here, the computer), and g_ether is for the gadget-side (here, the pocketbeagle). The pocketbeagle has an OTG USB, meaning that it can choose between host and gadget. But my computer is always a host, and therefore needs a gadget on the other side.

That's the reason why cdc_ether running on the pocketbeagle would not be recognized when plugging the board into my computer!

In the end, just starting g_ether (modprobe g_ether) is enough for the pocketbeagle to be recognized by my computer as a network interface.

Note: it turned out that the OE/master branch of pocketbeagle-meta was working better for me, already including g_ether!


credit: JonasVautherin
Answered September 19, 2019
Your Answer