1. Introduction
The M5Stack Gateway H2 is a versatile, stackable development module designed for multi-protocol IoT gateway applications. It is built around the ESP32-H2-MINI-1, featuring a RISC-V 32-bit single-core processor. This module offers comprehensive support for modern smart home communication standards including Zigbee 3.0, Thread, and Matter over Thread protocols, leveraging integrated IEEE 802.15.4 wireless communication and a hardware encryption engine for secure connectivity.
Its design includes configurable DIP switches for flexible interface mode selection and supports multi-module stacking within the M5Stack ecosystem. The Gateway H2 Module is an ideal solution for developing smart home hubs, environmental monitoring systems, and low-power wireless sensor networks.
2. Product Overview

The Gateway H2 Module features:
- DIP Switch: An 8-position DIP switch for configuring UART/SPI interface selection and wireless control.
- Burning Port: A dedicated port for programming and firmware updates of the ESP32-H2-MINI-1.
- ESP32-H2-MINI-1: The core microcontroller unit, a RISC-V 32-bit single-core processor.
- Stackable Design: Compatible with other M5Stack modules for expanded functionality.
3. Setup and Configuration
3.1 Package Contents
Ensure all items are present in your package:
- 1 × Gateway H2 Module
3.2 DIP Switch Settings
The 8-position DIP switch allows for flexible configuration of the module's interfaces and wireless control. Refer to the PinMap table below for specific GPIO assignments and their functions when configuring the DIP switches.

The schematic diagram provides a detailed view of the internal connections and components, which can be useful for advanced debugging and custom integrations.

3.3 Stacking with M5Stack Cores
The Gateway H2 Module is designed to be stackable with M5Stack CORE, CORE2, and CORE S3 units. Ensure proper alignment of the pin headers when stacking to avoid damage. The module provides the necessary interfaces for communication with the stacked core.
3.4 Initial Programming (Burning Port)
To program the ESP32-H2-MINI-1, connect a suitable programmer to the burning port. This port is used for flashing firmware, bootloaders, and custom applications onto the module. Consult the ESP32-H2 documentation for detailed programming instructions and toolchain setup.
4. Operating Instructions
4.1 Powering the Module
The Gateway H2 Module typically receives power through the M5Stack core it is stacked upon, or via its dedicated power input if used standalone. Ensure the power supply meets the module's voltage requirements (e.g., 3.3V) to prevent damage.
4.2 Wireless Communication
The module supports Zigbee 3.0, Thread 1.3, and Matter protocols over IEEE 802.15.4. These protocols enable robust and secure communication for smart home and IoT devices. Implement the appropriate software libraries and configurations for your chosen protocol within your development environment (e.g., UIFlow 2.0, Arduino IDE).
- Zigbee 3.0: For mesh networking with a wide range of smart home devices.
- Thread 1.3: An IPv6-based mesh networking protocol for IoT.
- Matter: An open-source connectivity standard built on IP, designed for interoperability across smart home ecosystems.
4.3 Development Environment
The Gateway H2 Module is compatible with popular development environments:
- UIFlow 2.0: A visual programming platform for M5Stack devices, suitable for rapid prototyping.
- Arduino IDE: A widely used IDE for embedded development, offering extensive libraries and community support for ESP32-H2.
Refer to the M5Stack official documentation and community resources for specific programming guides and examples.
5. Maintenance
- Cleaning: Use a dry, soft cloth to clean the module. Avoid using liquids or solvents.
- Storage: Store the module in a dry, anti-static environment when not in use.
- Firmware Updates: Regularly check for and apply firmware updates from M5Stack to ensure optimal performance, security, and access to new features. Updates are typically performed via the burning port.
- Environmental Conditions: Operate the module within the specified operating temperature range of 0°C to 40°C.
6. Troubleshooting
- Module Not Powering On:
- Ensure the M5Stack core or external power supply is correctly connected and providing adequate power.
- Check for any visible damage to the module or connectors.
- Wireless Communication Issues:
- Verify that the DIP switch settings are correctly configured for the desired interface (UART/SPI) and wireless control.
- Ensure your development code correctly initializes and uses the wireless protocols (Zigbee, Thread, Matter).
- Check for interference from other 2.4GHz devices.
- Programming Errors:
- Confirm that the burning port connection is secure.
- Ensure the correct drivers for your programmer are installed.
- Verify that the development environment (UIFlow, Arduino IDE) is configured for the ESP32-H2-MINI-1.
7. Specifications
| Parameter | Specification |
|---|---|
| SoC | ESP32-H2 (RISC-V 32-bit @ 96MHz) |
| Flash Memory | 2MB |
| Wireless Protocol | IEEE 802.15.4 (Zigbee 3.0, Thread 1.3, Matter) |
| Antenna | Onboard PCB antenna |
| Power Consumption (Standby) | 8.55mA @3.3V |
| Power Consumption (Operating) | 18.35mA @3.3V |
| Configuration | 8-position DIP switch |
| Operating Temperature | 0°C to 40°C |
| Dimensions | 54.0 × 54.0 × 13.1 mm |
| Weight | 11.8g |
7.1 Product Dimensions

8. User Tips
- When developing with the Gateway H2, start with the official M5Stack examples for UIFlow or Arduino IDE to quickly understand its capabilities.
- For complex IoT projects, consider leveraging the Matter protocol for broader compatibility with various smart home ecosystems.
- Always double-check your DIP switch configurations before powering on, especially when changing interface modes.
- Utilize the stackable design to integrate the Gateway H2 with other M5Stack modules, expanding your project's functionality.
9. Warranty and Support
For warranty information, technical support, and additional resources, please refer to the official M5Stack website or contact their customer service. Keep your purchase receipt for any warranty claims.





