nOTG cable for the WLAN Pi M4

nOTG cable for the WLAN Pi M4

Date published
February 20, 2023
Tags
WLAN PiWi-Fi

At the time of writing there are two models of WLAN Pi available:

Read more about the different WLAN Pi units and capabilities:

One 'missing' feature of the WLAN Pi M4 is OTG support by the USB Type-C port.

OTG - On The Go

With respect to the WLAN Pi, OTG refers to the ability of a single USB cable able to provide both power and establish a data link between a laptop and WLAN Pi. The data link takes the form of a virtual network interface, using ethernet over USB, making it possible to browse to the webGUI or ssh into the WLAN Pi directly from the host laptop.

On the 'previous' generations NEO 2 and Pro models of WLAN Pi the data/power port (Micro-B and Type-C, respectively) the OTG interface was configured with a static IP address and DHCP server so that any connected laptop would establish a network connection and be served up an IP address in the correct subnet so that the two devices could communicate without further user intervention.

The USB Type-C port on the WLAN Pi M4 is UNABLE to support OTG.

nOTG for the WLAN Pi M4

It is possible to workaround the lack of native OTG on the WLAN Pi M4.

Essentially we 'need' to provide power and IP connectivity to the WLAN Pi from a single port on the laptop with as little configuration as possible.

This USB Type-C to Ethernet and USB-A adapter from Uni gives us roughly 90% of what we need!

There are many similar items out there that should work equally well!

If you throw in:

..and assemble them together into something like this ugly monster

It is possible to deliver power and establish an Ethernet connection to the WLAN Pi from a single USB Type-C port from your laptop.

One further configuration step is required to enable IP connectivity between the laptop and the WLAN Pi. When the WLAN Pi is in 'Classic' mode ethernet interfaces are configured as DHCP clients, it needs to be served an IP address.

The path of least resistance is to use the 'internet connection sharing' feature on macOS or Windows to serve up an IP address to your WLAN Pi. This should work whether you have an active internet connection or not and comes with the additional benefit of providing internet access to the WLAN Pi (assuming your laptop has access). Keep reading to find out how!

Internet Connection Sharing

DISCLAIMER / WARNING When Internet Connection Sharing is active you MUST be aware that your laptop will run a DHCP service and hand out IP addresses on the interface(s) you have selected. That is good in this specific scenario, where you connect a WLAN Pi to the other side of that interface! That is exactly what we came here for. BUT... If you use that ethernet interface for other tasks, tasks that do not require your laptop to be acting as a DHCP server! BAD, BAD things will start to happen when you plug that ethernet interface into an operational network. You should absolutely be disabling 'internet connection sharing' when you are not actively using it.

macOS Ventura and younger

pre-macOS Ventura

Internet Connection Sharing Windows

That's it, you are done, Windows should hand out an IP address to the WLAN Pi within 30-40 seconds.