Configuring a Raspberry Pi Zero for the first time just got a lot easier.
When setting up your Raspberry Pi Zero for the first time, the typical process was to
With OTG mode, the process is like this
This is a huge improvement as we no longer need to plug in the HDMI monitor or keyboard for initial setup!
When you plug the Pi into your computer in the above example, it is emulating a virtual Ethernet device. Essentially, your computer thinks you plugged a network card into it.
On top of the benefit of making initial setup easier, the OTG mode can do so much more. Many more modes are available to make the Pi emulate a multitude of hardware devices such as:
Mass storage (g_mass_storage)
Mass storage and Serial (g_acm_ms)
Ethernet and Serial (g_cdc)
Multi (g_multi) – Allows you to configure 2 from Ethernet, Mass storage and Serial
Gadget tester (g_zero)
This makes the Raspberry Pi like a hardware chameleon and opens up many possibilities for cool hacks.
Props to Andrew Mulholland for his work with this.
More information is at Andrew’s blog at: