nickjvturner.com
  • Channel Charts
  • AP Name Broadcast
  • Report Templates
  • Store
  • who?
nOTG cable for the WLAN Pi M4

nOTG cable for the WLAN Pi M4

Date published
Feb 20, 2023
Tags
WLAN PiWi-Fi

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

WLAN Pi M4WLAN Pi M4
WLAN Pi M4

Built upon an Mcuzone Carrier board hosting a CM4

WLAN Pi R4WLAN Pi R4
WLAN Pi R4

Built upon the Raspberry Pi 4

Read more about the different WLAN Pi units and capabilities:

Intended Use and Models | User Guide

The WLAN Pi product is a wireless networking device intended for use by qualified individuals in controlled educational, laboratory, or testing environments. It is specifically designed for incidental wireless network testing and analysis, with a primary focus on Rx operations. This device is not authorized for permanent installations, continuous transmission, or commercial deployments.

userguide.wlanpi.com

Intended Use and Models | User Guide

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.

uni USB-C to Ethernet hubuni USB-C to Ethernet hub
uni USB-C to Ethernet hub
uni USB-C to Ethernet hubuni USB-C to Ethernet hub
uni USB-C to Ethernet hub
uni USB-C to Ethernet hubuni USB-C to Ethernet hub
uni USB-C to Ethernet hub

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

uni USB C Ethernet Adapter, USB C HUB Ethernet 1Gbps with USB 3.0 [Driver Free, Aluminum] for MacBook Pro, Chromebook, XPS, iPad, iMac, Galaxy, iPhone 15pro/max, and Hard Drive Keyboard Mouse, etc

Buy

www.amazon.co.uk

uni USB C Ethernet Adapter, USB C HUB Ethernet 1Gbps with USB 3.0 [Driver Free, Aluminum] for MacBook Pro, Chromebook, XPS, iPad, iMac, Galaxy, iPhone 15pro/max, and Hard Drive Keyboard Mouse, etc

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

If you throw in:

USB-A Ethernet adapterUSB-A Ethernet adapter
USB-A Ethernet adapter
regular USB Type-C to Type-C cableregular USB Type-C to Type-C cable
regular USB Type-C to Type-C cable
90 degree USB-A to Type-C adapter90 degree USB-A to Type-C adapter
90 degree USB-A to Type-C adapter
short braided ethernet cableshort braided ethernet cable
short braided ethernet cable

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

nOTG cable components assemblednOTG cable components assembled
nOTG cable components assembled
WLAN Pi M4 and nOTG cableWLAN Pi M4 and nOTG cable
WLAN Pi M4 and nOTG cable

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

Step 1 - Launch System Settings
Step 1 - Launch System Settings
Step 2 - Navigate to the 'Sharing' PaneStep 2 - Navigate to the 'Sharing' Pane
Step 2 - Navigate to the 'Sharing' Pane

General > Sharing

Step 3 - Configure Internet SharingStep 3 -
Step 3 - Configure Internet Sharing

Check that Internet Sharing is disabled, click on the i to the right of the toggle switch

Step 4 - Enable Internet SharingStep 4 - Enable Internet Sharing
Step 4 - Enable Internet Sharing

That is it, toggle Internet Sharing on

pre-macOS Ventura

Step 1 - Launch System Preferences
Step 1 - Launch System Preferences
Step 2 - Navigate to the 'Sharing' PaneStep 2 - Navigate to the 'Sharing' Pane
Step 2 - Navigate to the 'Sharing' Pane
Step 3 - Configure Internet SharingStep 3 - Configure Internet Sharing
Step 3 - Configure Internet Sharing

Share your connection from: Wi-Fi To computers using: Check the box against the Ethernet interface from your dongle After ~30 seconds, fpms should display eth1 with an assigned IP address

Internet Connection Sharing Windows

Step 1 - Check that Windows recognises the USB to Ethernet adapterStep 1 - Check that Windows recognises the USB to Ethernet adapter
Step 1 - Check that Windows recognises the USB to Ethernet adapter

Right Click on the Windows Start Icon, click 'Device Manager'

Step 2 - Navigate to Network & Sharing CentreStep 2 - Navigate to Network & Sharing Centre
Step 2 - Navigate to Network & Sharing Centre

Right click on the Windows Start Icon, click Network Connections

Step 3 - Activate Connection Sharing on the network interface with an internet connectionStep 3 - Activate Connection Sharing on the network interface with an internet connection
Step 3 - Activate Connection Sharing on the network interface with an internet connection

Click Connection Properties

item
item
item
item

Click Network and Sharing Centre

item

Windows recognises my USB to Ethernet adapter

item

Click Sharing

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

item

notice that eth0 has no IP address and is down, but eth1 is up and now provides internet access

‣