Skip to content

Feature Request: Enable USB Host Support for External Devices on Tab5 #96

@Runaque

Description

@Runaque

Feature Request: Enable USB Host Support for External Devices on Tab5

Summary

The M5Stack Tab5 has a full-sized USB-A port which is currently non-functional
for host mode operation in UIFlow2 v2.4.4. Enabling USB host support would
unlock a wide range of use cases including external WiFi adapters, USB storage
devices, keyboards, and other USB peripherals.

Device Information

  • Board: M5Stack Tab5
  • SoC: ESP32-P4 + ESP32-C6 (via SDIO)
  • UIFlow2 Version: v2.4.4
  • MicroPython Version: v1.27.0-dirty (2026-04-22)

Current Situation

What IS available (confirmed via dir()):

import machine
print(dir(machine.USBDevice))
# ['BUILTIN_CDC', 'BUILTIN_DEFAULT', 'BUILTIN_NONE',
#  'active', 'config', 'remote_wakeup', 'stall', 'submit_xfer']

The USBDevice class is present but only implements device mode
allowing the Tab5 to act as a USB device when connected to a PC.

What is MISSING:

import usbhost
# ModuleNotFoundError: no module named 'usbhost'

The usb module exists but is essentially empty:

import usb
print(dir(usb))
# ['__class__', '__name__', '__dict__', '__path__']
# No actual host functionality

Hardware Capability

The ESP32-P4 has a built-in USB 2.0 OTG controller capable of both
device and host modes. The hardware fully supports USB host operation.
The Tab5 has a full-sized USB-A port — a form factor that strongly
implies host mode intent.

The limitation is purely at the software/firmware level — USB host
support is not exposed to MicroPython in UIFlow2 v2.4.4.

Use Cases

1. External WiFi Adapters

The Tab5's built-in WiFi is handled by an ESP32-C6 coprocessor via SDIO
which currently has stability issues (see issue #94). External USB WiFi
adapters such as the Alfa Network AWUS036ACS (RTL8811AU chipset) would:

  • Provide 5GHz band support (currently unavailable)
  • Offer significantly better range and sensitivity
  • Provide a stable alternative to the SDIO-based WiFi
  • Enable monitor mode and packet capture capabilities

2. USB Storage Devices

  • External USB drives for large data storage
  • Direct CSV/GPX file transfer without PC software
  • Backup storage for field data collection

3. USB Input Devices

  • External keyboards for text input
  • USB mice for precise UI control
  • Barcode/QR scanners

4. USB Serial Devices

  • External GPS modules via USB
  • Arduino/microcontroller communication
  • Industrial sensor interfaces

5. USB Hubs

  • Multiple devices simultaneously
  • Expanding the Tab5's connectivity significantly

Technical Implementation

The ESP32-P4 USB OTG controller supports host mode natively. MicroPython
already has USB host infrastructure available. Implementation would require:

  1. Enabling USB host mode in the ESP32-P4 USB OTG controller
  2. Exposing a usbhost module in MicroPython
  3. Basic device enumeration and driver framework
  4. At minimum: mass storage (MSC) and CDC-ACM drivers

Minimal requested API:

import usbhost

# Device enumeration
devices = usbhost.enumerate()
for d in devices:
    print(d.vid, d.pid, d.manufacturer, d.product)

# Mass storage
drive = usbhost.MSC(device)
drive.mount('/usb')

# CDC serial
serial = usbhost.CDC(device)
serial.write(b'hello')
data = serial.read(64)

Impact

The Tab5 has a full-sized USB-A port that currently serves no purpose from
a MicroPython perspective. Enabling USB host support would:

  • Make the USB-A port actually useful
  • Significantly expand the Tab5's capabilities
  • Enable professional grade applications
  • Differentiate the Tab5 from other M5Stack devices
  • Fix the implicit promise of having a USB-A port on a developer device

Additional Context

This feature request is filed alongside:

The Tab5 is clearly intended as a capable development platform. USB host
support would be a significant step toward realising that potential.

Confirmed Hardware

MicroPython: v1.27.0-dirty (2026-04-22)
Flash: 16MB
CPU: ESP32-P4 @ 360MHz
Board ID: 22 (Tab5)
USB-A port: physically present, host mode not enabled

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions