Custom Smart Zigbee Gateway Development Guide (Part-1): Microcontroller, Operating System, Antenna Design Selection

Choosing the right hardware platform and software environment is key to ensuring zigbee gateway development. At the same time, an appropriate antenna design can greatly increase the system's coverage area and signal quality. Therefore, developers need to comprehensively consider these factors in the design and implementation stage to ensure that the final zigbee gateway product can meet the expected performance standards and user needs. Thus, this article discusses the processor, operating system, and antenna selection, hope it is useful for Zigbee gateways development.
zigbee gateway development microcontroller os antenna
Table of Contents

Based on the supported protocols, Smart gateways can be classified into Bluetooth gateways, Zigbee gateways, RS232/485 gateways, KNX/Modbus gateways, RF (433) gateways, and multi-protocol gateways, etc.

Among them, Zigbee gateways are devices based on Zigbee wireless communication technology, mainly used to connect and manage multiple Zigbee devices. Zigbee technology is a near-range wireless communication technology based on the IEEE 802.15.4 standard, with the characteristics of low power consumption, low cost, large capacity, high security, and strong anti-interference performance. It is widely used in smart home, home automation, and security systems.

This article discusses the MCU, operating system, and antenna selection of Zigbee gateways, and explains them in detail through Dusun IoT’s Zigbee gateway solutions such as DSGW-030 Smart Zigbee gateway and DSGW-210 edge computing Zigbee gateway. Hope it is helpful for partners in the selection and development of Zigbee gateways! The following articles will also explain the hardware design, gateway performance testing, and difficulties in secondary development of gateways one by one. Let’s keep reading.

What is Zigbee Gateway

A Zigbee gateway is the core device of a Zigbee network and plays the role of a central controller in a smart system, responsible for connecting various devices to the Internet and realizing data transmission and control. Zigbee gateways have a variety of functions, including but not limited to wired and wireless data transmission, support for cloud access through TCP, UDP, MQTT, etc., and can implement rich network management functions in the cloud. In addition, it can also realize protocol conversion and data transmission between the Zigbee network and other networks.

In simple terms, a ZigBee gateway is the heart of smart home, and it realizes the functions of system information collection, information input/output, centralized control, remote control, and linkage control through it, to achieve efficient operation and data management of the smart home system. With the popularization of smart home devices, gateways can gradually be embedded as a functional module into other smart hardware, such as smart speakers, smart TVs, smart home control screens, and smart home appliances (water purifiers, refrigerators, etc.). Of course, independent IoT gateways still exist and are still an indispensable device in the smart home system.

For smart home manufacturers or brands, developing zigbee gateways from scratch faces many challenges. The lack of professional hardware knowledge, team and experience may bear cost, technical and other risks. As an IoT hardware expert, Dusun IoT has rich experience in IoT gateway design, R&D, production and manufacturing, and can provide customized smart gateway ODM/Secondary developement support services to our customers.

We will launch a series of articles to help you understand zigbee gateway development. This article takes the common ZigBee gateway in smart homes as an example, starting from the selection ideas of the ZigBee gateway’s processor, operating system, and antenna design.

Choosing the Right Microcontroller

When choosing a microcontroller, there are a wide range of brands and models to choose from, such as RK3328, NXPIMAX6U11, MT7620, etc. We can choose according to the size of our data stream and price, targeting RAM, ROM, main frequency and various parameters.

Advantages of Large RAM

When choosing a gateway, we can try to choose a larger RAM memory. Large RAM has the following advantages:

  • Fast data access: RAM is one of the fastest memories in a computer, designed to provide high-speed read and write access to meet the computer’s demand for fast data processing. Large RAM means that more data can be stored in high-speed RAM, which speeds up data read and write speeds.
  • Temporary storage: RAM plays the role of temporary storage in a computer. When a computer runs an application, it loads the data and instructions that need to be processed into RAM so that the CPU (central processor) can quickly access and operate on this data. Therefore, a larger RAM capacity means that the computer can handle larger temporary data sets, which is especially important when performing complex calculations or running large applications.
  • Multitasking: Large RAM is essential for multitasking. In the operating system, when the user runs multiple applications at the same time, RAM allows the computer to quickly switch between different applications, ensuring that each application can get enough memory space and computing resources, thus achieving a smooth user experience.
  • Data caching: Large RAM can also be used to cache frequently accessed data, thereby improving system response speed.
  • Image processing: In image processing, large RAM is used to store image frame buffers, image filter coefficients, etc., to speed up image processing.

The choice of the size of the gateway RAM is a process that needs to be balanced based on actual needs and budget. When choosing, you can comprehensively consider the network data volume, the complexity of the processing task, the cache demand, future expansion plans, budget, and technical compatibility. At the same time, you can also refer to the suggestions or specifications of the gateway manufacturer to ensure that you choose the right RAM size. Please note that the specific ROM size selection may vary depending on different gateway models, application scenarios and budgets.

Advantages of Large ROM

The advantages of large ROM (read-only memory) mainly include the following aspects:

  • High stability: The data in ROM is scattered from the inside to the outside in a spiral shape, so even if it is read tens of thousands of times, the data will not change, and it has extremely high stability.
  • Non-volatile: ROM is a storage device that can only be read and cannot be written. Once the data is written, it cannot be changed or deleted, so it has high reliability.
  • High integration: The structure of ROM is simple and the integration possibility is high, which reduces the production cost.
  • Fast speed: The read speed of ROM is very fast, which allows the computer to efficiently access the stored data.
  • Low power consumption: The power consumption of ROM is relatively low, which is conducive to energy saving and extending the service life of the device.

When choosing the size of the ROM for gateway, multiple factors need to be considered comprehensively. First, it is necessary to understand the functions of the gateway and the required storage space for the operating system, firmware, and applications. This includes the size of the operating system itself, the necessary drivers, and any pre-installed applications.

Secondly, consider the expected service life of the gateway and possible firmware or software updates. As technology continues to develop, there may be new firmware or software updates to enhance the functionality of the gateway or fix potential security issues. Therefore, it is necessary to reserve enough space for future updates.

In addition, if you plan to customize the gateway’s functions or develop specific applications, this also requires additional storage space.

Finally, you also need to consider the budget and hardware compatibility. Generally speaking, the larger the ROM capacity, the higher the cost may be. Therefore, it is important to choose the most appropriate ROM size within the budget. At the same time, it is necessary to ensure that the selected ROM size is compatible with the hardware platform of the gateway.

In summary, the choice of gateway ROM size needs to comprehensively consider factors such as functional requirements, expected updates, customized development, budget, and hardware compatibility. It is recommended to choose an appropriate ROM size based on the understanding of these needs and refer to the suggestions or specifications provided by the IoT gateway manufacturer. Please note that the specific ROM size selection may vary depending on the different gateway models, application scenarios, and budgets.

Advantages of Processor with Higher Main Frequency

  • Stronger performance: The main frequency is directly related to the running speed of the CPU. Therefore, a CPU with a higher main frequency can complete computing tasks faster and provide a smoother user experience. This is especially important for professional applications and games that require a lot of calculations.
  • Improve the response speed of the computer: When operating a computer, many operations require waiting for the computer’s response, such as opening software, copying and pasting files, etc. A CPU with a higher main frequency can respond to these operations faster, making the computer more fluid.
  • Higher data processing ability: The main frequency can be understood as the ability and speed of the CPU to process data. The higher the main frequency, the faster the CPU processes data and the higher the efficiency.

The choice of the main frequency of the processor for gateway needs to comprehensively consider factors such as performance requirements, power consumption and heat dissipation, compatibility and expandability, and budget limitations. It is recommended to learn about the performance and price differences of processor with different main frequencies before choosing, and choose according to your actual needs.

DSGW-030 Zigbee smart gateway adopts MTK7688 processor, which has the characteristics of high performance, low cost, and easy development. DSGW-030 sub models support multiple wireless protocols including Zigbee 3.0, Bluetooth 5.2, and Wi-Fi 2.4G, etc. It supports data acquisition from Zigbee 3.0, BLE terminal devices, and sends it to the cloud through Wi-Fi 2.4G and Ethernet.

DSGW-210 edge computing gateway supports multiple protocols such as Zigbee, BLE, Z-Wave, adopts RK3328 processor, provides modular configuration to meet the needs of various development, and is perfectly suitable for the development of smart devices in residential and commercial scenarios

210 multiple backhaul.jpg

Choosing the Right Operating System for Zigbee Gateway

Common operating system types include Linux, Andriod, RTOS, Debian, etc. The following lists the advantages and disadvantages of these systems in categories:

Linux System

Advantages of Linux system:

  • Open source: The source code is publicly available, and users can freely view and modify the system’s source code.
  • Security: The system is more secure and provides multi-level user permission management and access control.
  • Stability: The Linux system is stable and reliable, and is often used in the server field, and will not crash after running for a long time.
  • Free or low cost: Most Linux distributions are free, which can save computer hardware and maintenance costs.
  • Compatibility: Linux is compatible with UNIX systems and can run a large number of applications on UNIX.
  • Multi-user multitasking: Supports multiple users to log in at the same time, and can assign different tasks and permissions to each user.
  • Wide range of hardware support: Due to open source, there is a wide range of hardware support, including drivers.
  • Customizable: Users can customize the system according to their needs and install the necessary software packages.

Disadvantages of Linux system:

  • Learning curve: It may take some time for Windows users to become familiar with and learn how to use the Linux command line.
  • Graphical interface: Although the graphical interface is easier to use, some tasks may need to be completed through the command line.
  • Technical support: Since Linux is not a mainstream operating system, it may be difficult to find official support when encountering problems.
  • Non-user-friendly interface: Compared to Windows, the user interface may not be as intuitive as Windows.
  • Requires rich technology: Some users may find that it requires a high level of technical knowledge to install and maintain the Linux system.

Android System

Advantages of Android system:

  • Diversity of device adaptability: The Android system adapts to a wide range of brands and models of mobile devices, including mobile phones, tablets, TVs, watches, etc., providing a rich product selection.
  • Open ecosystem: The Android system adopts an open source model, allowing developers to freely access, modify and customize the operating system, promoting technological innovation and flexibility.
  • Rich application ecosystem: The Android system has a huge application ecosystem, including the Google Play app store and other third-party app markets, providing a large amount of applications for users to download and use.
  • Powerful development tools and support: The Android system provides a wealth of development tools and support, such as the Android Studio development environment and the Java programming language, helping developers efficiently develop and test applications.
  • Global user base: The Android system has a global user base, providing developers with huge market opportunities.
  • Leading global market share: The global market share of the Android system exceeds 85%, making it the preferred platform for developers to launch the market.
  • Supports multiple development languages and frameworks: The Android system supports multiple programming languages and development frameworks, such as Java and Kotlin, which makes it convenient for developers to choose according to their own technical background.

Disadvantages of Android system:

  • Security issues: Due to the open nature of the Android system, it may become a target for malware and viruses. Although there are security measures, there are still security risks.
  • Performance issues: The performance of the Android system may be affected by device diversity and high modularity, resulting in low efficiency, stuttering or delays.
  • Fragmentation issues: Due to the customization and modification of the Android system by various manufacturers, there are differences between the system versions and interfaces on different devices, which increases the difficulty of adaptation for developers and the inconsistency of user experience.
  • Privacy disclosure risks: Although the Android system provides some privacy settings options, users still need to pay attention to privacy disclosure issues, and applications may collect sensitive information.
  • Application quality varies: Although there are high-quality applications, there are also a large number of low-quality applications on the Android platform, which may affect the user experience.

RTOS System

Advantages of RTOS system:

  • Real-time: RTOS has the ability to respond quickly to external events, ensuring that the system can respond to external events within a certain time, suitable for scenarios that require real-time control.
  • Reliability: Through priority scheduling and resource management, RTOS reduces the possibility of task conflicts and resource contention, and improves the stability of the system.
  • Predictability: The task scheduling and time management of RTOS make the execution time of tasks predictable, which is easy for system design and optimization.
  • Multi-tasking support: RTOS can manage multiple tasks at the same time, improving the concurrent processing ability of the system.
  • Easy to maintain and extend: RTOS provides a rich API and components, making system development and maintenance more convenient.
  • Modular design: RTOS encourages the creation of software functions as independent, proven tasks, and their independence makes it easy to reuse these modules in other designs.

Disadvantages of RTOS system:

  • Complexity: Compared with bare metal programming, the introduction of RTOS increases the complexity of the system and requires more learning and understanding.
  • Resource occupation: RTOS itself needs to occupy certain system resources, including memory and processor time. For resource-constrained embedded systems, this is a factor that needs to be considered.
  • Development costs: Development using RTOS may require purchasing a commercial license or paying related development fees, which increases development costs.
  • Debugging Difficulty: Due to the concurrency and real-time nature of RTOS, debugging RTOS systems can be more difficult than bare metal programming.

Debian System

Advantages of Debian system:

  • Stability: The stable version of Debian focuses on system stability and security, and is suitable for critical application scenarios such as production environments and servers.
  • Security: Debian has a strong security mechanism, including its own firewall and SELinux system security module, which can effectively protect system security and reduce the risk of attacks and vulnerabilities.
  • Timely updates: Debian has a powerful software update system, which can quickly update software packages and kernels to ensure the security and stability of the system.
  • Free and open source: Debian is completely free and open source software, and users can freely distribute, use and modify it.
  • Rich software packages: Debian’s official software repository has a rich collection of software packages to meet the needs of various application scenarios, and also supports source code compilation and installation.
  • Easy to maintain: Debian adopts the APT package management system, which makes it easy for users to install, upgrade and delete software packages, simplifying the work of system maintenance and management.
  • Multi-architecture support: Debian supports multiple processor architectures, including x86, AMD64, ARM, etc., and can run on various devices.

Disadvantages of Debian system:

  • Slow version updates: Although Debian’s stability is widely recognized, its version update speed is relatively slow, because the release version needs to undergo strict testing and review.
  • Not user-friendly: In some aspects, Debian may not be as user-friendly as other Linux distributions, especially when installing and configuring for the first time.
  • Community-driven response is not timely: The development and maintenance of Debian is the responsibility of a large volunteer community. Although this guarantees the freedom and openness of the system, it may also lead to insufficient support and response in some cases.

Dusun IoT’s smart IoT gateway is a hardware solution tailored for enterprise-level IoT developers. By providing a mature and complete hardware platform that supports various operating systems, including but not limited to Linux, Andriod, RTOS, Debian, OpenWrt, etc., partners can easily port or independently develop applications, or modify and secondary develop the underlying firmware based on the open source SDK, greatly simplifying the complexity of the development process of IoT products and solutions for enterprises, and helping partners achieve faster technological innovation and product landing.

Antenna & Communication Distance for Zigbee Gateway

When selecting a Zigbee gateway, the communication distance of Zigbee gateway is also one of our main considerations. If we hope that Zigbee communication can go far enough, how should we choose?

Types of Antenna

There are many commonly used antenna forms for Zigbee gateways. In the case of the antenna being adjusted to the optimum, the radiation performance is usually sorted as follows: External fiberglass antenna >External rod antenna > Built-in FPC antenna > On-board antenna > Ceramic antenna.

TypeFrequency (MHz)Gain (dBi)VSWRImpedance (Ω)Features
Glass fiber antenna2400-24506≤1.550Suitable for outdoor use, strong performance, high price
Rubber stick antenna2400-24503≤1.550Strong performance, requires external mounting
Built-in FFC antenna2400-2450-1≤250Built-in for flexible layout, general performance
On-board antenna2400-2450-3≤250Low efficiency, stable performance
Patch ceramic antenna2400-2450-4≤250Small clearance area required, poor performance

Size of Antenna

From the perspective of antenna debugging to the optimum state, the larger the antenna size and net clearance area, the better the antenna performance.

Example 1. Take the following two antennas as an example.

  • ANT (left) length 208mm, 2440Mhz efficiency 60%, gain 3dBi
  • ANT (right) length is 116mm. 2440Mhz efficiency 45%, gain 1dBi
Size of Antenna

Example 2. Taking PSA’s ceramic antenna RFANT3216120A5T as an example, if the headroom area is less than the following headroom requirements, the antenna efficiency will be lower than expected.

ceramic antenna

Transmission Parameters

In order to improve the transmission distance, we can choose from the following board-level parameters when selecting chips and software settings. Taking EFR32MG21 as an example, we can choose chips with high power and high sensitivity, and if the data transmission demand of the gateway is relatively small, we can set a lower transmission rate mode in the software to guarantee the communication distance.

(1) There are versions with 10dBm and 20dBm to choose from, and the communication distance of 20dBm is far greater than 10dBm.

transmission distance low power

(2) The sensitivity of the low-speed mode is higher

transmission distance hign reciever


In this article, we have discussed in detail several key components of Zigbee smart gateways, including processor, operating system applications and diversified antenna design. By comparing different hardware such as EFM32MG21 and MTK7688, as well as various operating systems such as Android, RTOS, Debian, Linux, etc., we have demonstrated how to choose the most suitable technology and configuration for Zigbee Gateway according to project requirements. In addition, we have also analyzed how different antenna parameters such as frequency, gain and size affect communication efficiency and range.

Choosing the right hardware platform and software environment is key to ensuring zigbee gateway performance and reliability. At the same time, an appropriate antenna design can greatly increase the system’s coverage area and signal quality. Therefore, developers need to comprehensively consider these factors in the design and implementation stage to ensure that the final product can meet the expected performance standards and user needs.

Finally, as technology continues to advance and market demands change, the development of smart Zigbee gateways should also continue to track the latest technology trends and industry standards to remain competitive and innovative. I hope this guide can provide you with valuable information and inspiration to help you succeed in the development of smart gateways. At the same time, Dusun IoT provides smart programmable Zigbee gateways, specially designed for enterprise-level IoT developers. It provides a mature hardware platform and open source SDK, supports easy porting or secondary development of applications, and simplifies the development of IoT solution. Dusun also supports IoT Gateway ODM service to meet different project requirements.

Choose Dusun’s Zigbee gateway or customized services, and you will get industry-leading products and first-class technical services. Welcome to consult Dusun at any time. We will wholeheartedly provide you with the most professional answers and services to help your products be successfully launched and create a better future together.

Leave a Reply

Looking For An IoT Device Supplier For Your Projects?


    This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

    IoT Gateways for Recommendation


      This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

      Welcome to DusunIoT

      Hi there 👋 Is there anything we can help you with today? Please fill in the form below for the team to follow up if you become disconnected.


          This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

          Ultimate IoT White Paper for Developer Gateway

          DusunIoT Distributor Program

            This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

              This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.