Boot S805X into USB Gadget Mode?

Is there a way to turn the frite into a usb gadget, aka have it show up as a thumb drive on another host? I’m trying to build a wifi-enabled smart thumb drive just like the “Pi Zero as usb drive” trick. I’m all out of Pi Zeros, so I figure I’d give the frite a try. This is going to be attached to a remote machine that will only read from it occasionally, but it’s more efficient for me to have it on the network than to keep track of thumbsticks moving back and forth (and subsequently lost or misplaced) to get files served up.

AML-S805X-AC is the same architecture as AML-S905X-CC. The same tutorials apply.

I must be missing something or searching for the wrong terms, but I can’t find any HOWTO on here related to USB gadget mode.

I didn’t see anything under https://forum.loverpi.com/categories/libre-computer-aml-s905x-cc/

USB OTG

So the OTG mode is boiled down to three commands?

echo device | sudo tee /sys/bus/platform/drivers/dwc3-meson-g12a/d0078080.usb/usb_role/d0078080.usb-role-switch/role
echo c9100000.usb | sudo tee /sys/bus/platform/drivers/dwc2/unbind
echo c9100000.usb | sudo tee /sys/bus/platform/drivers/dwc2/bind

There aren’t any other instructions. Do I need to run it once, put it in crontab, run on boot, something else?

Run it when you want to switch from host to OTG?

Updated the board and released the packages held back. Got the device commands to execute, but giving the error below in dmesg

echo device | sudo tee /sys/bus/platform/drivers/dwc3-meson-g12a/d0078080.usb/usb_role/d0078080.usb-role-switch/role
echo c9100000.usb | sudo tee /sys/bus/platform/drivers/dwc2/unbind
echo c9100000.usb | sudo tee /sys/bus/platform/drivers/dwc2/bind

matt@aml-s805x-ac:~$ dmesg
[  207.912246] dwc3-meson-g12a d0078080.usb: Broken manual OTG switch
[  207.912271] dwc3-meson-g12a d0078080.usb: switching to Device Mode
[  228.813285] dwc2 c9100000.usb: Looking up vusb_d-supply from device tree
[  228.813324] dwc2 c9100000.usb: Looking up vusb_d-supply property in node /soc/usb@d0078080/usb@c9100000 failed
[  228.813369] dwc2 c9100000.usb: supply vusb_d not found, using dummy regulator
[  228.813660] dwc2 c9100000.usb: Looking up vusb_a-supply from device tree
[  228.813677] dwc2 c9100000.usb: Looking up vusb_a-supply property in node /soc/usb@d0078080/usb@c9100000 failed
[  228.813706] dwc2 c9100000.usb: supply vusb_a not found, using dummy regulator
[  228.813839] dwc2 c9100000.usb: Looking up vbus-supply from device tree
[  228.813852] dwc2 c9100000.usb: Looking up vbus-supply property in node /soc/usb@d0078080/usb@c9100000 failed
[  228.814063] dwc2 c9100000.usb: EPs: 7, dedicated fifos, 712 entries in SPRAM

host pc doesn’t see any new drive appear

Bueller? Anybody? These devices are tough to troubleshoot when there’s little to no documentation and probably one person maintaining their entire support forum.

What drive? Device mode only turns the port to a client. You need to setup gadget emulation.