Thread Support for Flipper Zero, Part 1: Introduction

This is the first part of the Thread Support for Flipper Zero series. The series tells the story of my OpenThread research and how I decided to integrate an nRF52840 SoC with my Flipper Zero. There will be hardware, software, and notes about the difficulties I’ve encountered.
What This Part Is About
In this part, I explore how to integrate OpenThread support with the Flipper Zero, and why. The implementation utilizes Matter, a unified standard for smart home devices, to enhance the Flipper Zero’s capabilities. I will explore the technical aspects of this integration in the second part and provide a guide for developers there. The third part will describe a use case and a tool to interact with a Thread network.
If you already know what Thread, Matter, and Flipper Zero are, skip the introductions and jump straight to Flipper Zero’s Relation to OpenThread.
Since this post serves as a high-level introduction to the necessary technologies, and some of the components might be new to you, I will start by describing them and their relationships to each other.
Introduction to Thread

OpenThread is an open-source implementation of the Thread networking protocol. It is designed to create a reliable, secure, robust, self-healing, and low-power wireless mesh network suitable for home and commercial applications. OpenThread uses multiple networking layers, including IPv6, 6LoWPAN, IEEE 802.15.4, and Mesh Routing, making it highly versatile for many use cases.

Components of a Thread Network
- Thread Border Router: A device that connects a Thread network to an existing IP-based network, such as Wi-Fi or Ethernet.
- Thread Router: A device that relays messages within the mesh network and helps maintain the network structure.
- Thread Leader: A device that manages the network by assigning addresses, and maintaining network topology. It can also change network keys. By default, it is elected by the routers but can be forced to favor itself by network members.
- End Devices: Devices that communicate with only one Thread router. They do not forward messages, and are typically low-power devices like sensors or smart bulbs.
Key Features of Thread Networks
- Mesh Networking: Thread networks utilize a mesh topology, allowing devices to communicate directly and relay messages throughout the network. This improves reliability and coverage by eliminating any single point of failure.
- Low Power Consumption: Thread is energy-efficient, making it ideal for battery-operated devices. It utilizes IPv6 over low-power wireless personal area networks (6LoWPAN).
- Scalability: Thread networks can scale efficiently from a few devices to hundreds, making them suitable for both small home setups and larger commercial installations. However, every network needs at least one Thread Border Router.
- Security: Thread includes robust security features, such as encryption and authentication to ensure that communications within the network are secure.
- Interoperability: Thread is designed to integrate seamlessly with existing IP-based networks, enabling compatibility with other IoT protocols and devices. The protocol is built with IPv6 support but also employs NAT64 to work with home IPv4 networks.
- Self-Healing: Thread routers enable the mesh network to automatically reconfigure if a device fails or is removed, ensuring continuous operation.
Thread Advantages Over Other Protocols
Compared to Wi-Fi, Thread is more energy-efficient and is better suited for low-power and IoT devices, although it has significantly lower throughput. In contrast to Zigbee, Thread utilizes native IP-based networking, which can simplify integration with other home systems and the internet. However, this approach may also introduce new security concerns, as I will explore in a later part of the series.
Introduction to Matter

Matter is a standardized protocol for smart home devices developed by leading companies in the home IoT industry and governed by the Connectivity Standards Alliance (CSA). Its primary goal is to ensure interoperability among different devices and platforms, simplifying developers’ integration process.
Matter supports multiple communication technologies, including Wi-Fi, Ethernet, and Thread, making it a reliable choice for connected home solutions.

Components of a Matter Network
- Matter Device: Hardware that supports the Matter protocol can connect to and be controlled by a Matter Controller. Such devices include light bulbs, switches, sensors, thermostats, blinds, door locks, bridges, and media devices. This list continues expanding to include new types of devices.
- Matter Fabric: It is something like a virtual network within the home network that enables Matter Devices, Administrators, and Controllers to communicate with each other. This network operates across various physical networks, including Wi-Fi, Thread, and Ethernet. It facilitates communication and coordination among different Matter Devices from multiple vendors within the home.
- Matter Controller: A device or application that manages and controls Matter devices within a Matter Fabric and additionally provides a user interface for monitoring and controlling smart home devices. A good example is a mobile phone as an interface and a smart hub as a controller.
- Matter Commissioner: A device or application designed to configure a new Matter Device. It’s primary goal is to verify the new device’s identity and authenticity, and assign network credentials. Mobile apps typically collaborate with smart speakers or displays with commissioning features.
- Matter Administrator: A role in the Matter Fabric that is responsible for managing the network, including adding and removing devices. It ensures the security and integrity of the Matter Fabric by overseeing device management.
Examples of Matter Devices

Nanoleaf® Smart Bulbs. Image © Nanoleaf



Key Features of Matter
- Interoperability: Matter seeks to address the fragmentation in the smart home market by providing a universal language for devices from various brands to communicate effectively.
- Security: Matter includes strong security features like encryption and secure device onboarding, protecting user privacy data, and ensuring secure communication between devices.
- Ease of Use: The standard aims to simplify the setup and use of smart home devices, making it easier for consumers to create and manage their smart home ecosystems. The release of devices on the market may evoke mixed feelings.
- Broad Industry Support: Matter is backed by major tech companies, including Apple, Google, Amazon, and Samsung, ensuring widespread adoption and support across various devices.
How Is Matter Connected to Thread?

Matter uses Thread as one of its main networking protocols, in addition to Wi-Fi and Ethernet. While Matter defines the application layer and ensures that devices can communicate seamlessly, Thread is the underlying network layer that allows devices to communicate efficiently.

Devices compatible with Matter and Thread can easily connect within a Matter ecosystem if there is at least one Thread Border Router in the home network. This integration combines Thread’s mesh networking capabilities and Matter’s features for interoperability and security, as well as its user-friendly design, so users should get a smoother and more reliable smart home setup.
Introduction to the Flipper Zero

Flipper Zero is a portable multi-tool for pen testers and tech enthusiasts. It can interact with various digital systems, including RFID, NFC, Bluetooth, and radio protocols. It is fully open-source and customizable, which lets users expand its functionality through software and hardware modifications. One example is the Wi-Fi extension board, which gives access to various low-level Wi-Fi functions and attacks.
GPIO on the Flipper Zero
A general-purpose input/output (GPIO) pin is a versatile digital signal pin found on an integrated circuit or electronic circuit board, such as those used in microcontrollers (MCUs). This pin can function as either an input or an output, or both, and can be controlled through software.
Flipper Zero has dedicated GPIO pins, some of which are available for user projects. These pins can be used for various purposes, such as digital input/output, analog input, PWM output, and more. The pins operate at a 3.3V CMOS level input and are 5V tolerant.
Flipper Zero’s Relation to OpenThread
Flipper Zero includes a variety of hardware components, such as:
- Microcontroller Unit (MCU) STM32WB55RG DataSheet
- Radio Modules (Bluetooth LE 5.4, Sub-1 GHz Transceiver, RFID and NFC Transceiver) 3. Infrared module
- GPIO with SPI, UART, I2C to USB converter
- USB-C port
The MCU might support Thread, but it has a memory limit of 256 KB of RAM and 1024 KB of Flash. Unfortunately, the code that manages the second core of the MCU – which is responsible for various radio protocols, including BLE, Zigbee, OpenThread, and others – is provided by ST, the chip manufacturer, in the form of signed and encrypted binaries. This code is closed-source, and partners do not have access to its source code.
Additionally, the MCU has several security measures designed to prevent tampering with the second core, such as restricting access to its RAM or reading the flash memory containing its firmware. Currently, there are no known methods to bypass these protections. As a result, we are restricted to using only the features and protocols provided by ST.
The full Bluetooth LE stack for the Flipper MCU is 127KB, which exceeds the device’s available storage. At that time, the Flipper Team opted to use a 98KB light Bluetooth LE stack to establish communication with a mobile phone. Please note that this refers to Bluetooth Low Energy (BLE), not Bluetooth Classic. For a proper implementation of OpenThread, we require a fully functional Bluetooth LE stack, along with the implementation of ST-specific glue code.
ST provides closed-source firmware to support OpenThread, specifically the STM32WB Wireless Binaries. However, the stm32wb5x BLE Thread static firmware is 500KB, while the stm32wb5x Thread FTD firmware is 416 KB. If an additional 30KB creates issues, fitting 300 to 400KB will be highly unlikely.
For my integration project, the Thread protocol requires the introduction of a new SOC with a radio chip. I wanted to reduce the development time, so I chose a well-known platform for development and integrated Flipper with the NRF 52840 SoC.
To find out more about my project, read the next post in the series, and consider following CUJO AI Labs on BlueSky: @cujoailabs.bsky.social