SSH into BPI-M2 Zero over OTG (Ubuntu 16)

I’m trying to develop a headless application for the BPI M2 Zero, but need to be able to configure OTG networking through the USB cable. I have successfully achieved this on a raspberry pi zero W running raspbian through the instructions outlinedhere I attempted to adapt these instructions (naiively) hoping they would work on the banana pi. I edited boot.cmd by adding modules-load=dwc2,g_ether

This is where I added it

setenv bootargs "board=bpi-m2z root=${rootdev} rootwait modules-load=dwc2,g_ether rootfstype=${rootfstype} ${consoleargs} disp.screen0_output_mode=${disp_mode} panic=10 consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} ubootsource=${devtype} ${extraargs} ${extraboardargs}"

I also edited sys_config.fex to include dtoverlay=dwc2

I realize these were probably naiive choices to edit to get this to work, but there’s not much documentation on this device compared to the raspberry pi so I’ve tried to figure things out for myself

Has anyone successfully achieved this? I appreciate any guidance

Thanks Daniel

Don’t have an M2 zero, but are you sure your kernel provide those modules as they may not have been compiled or copied in the right folder? Same for dtoverlay which has to be enabled in kernel to work.

Did you manually try to load the modules via sudo modprobe <modul> to see if the modul is loaded via sudo lsmod and that you already can setup the usb ethernert adapter?

Haven’t played with OTG yet, only read a bit about it here