Small projects are really tiring. It seems very simple in principle. The underlying equipment transmits data through Zigbee, and the upper layer equipment uses DTU for data communication.
However, there is a problem: DTU is a single transmission. When the upper-layer device performs command control, if the underlying device uploads data, the control command will fail, you must strictly control the data upload time and command processing time.
The underlying device is also very simple. A ZigBee Coordinator acts as the management center to process the data of each device and serves as a total data outlet. Connect to DTU as the entry to upper-layer commands.
However, it is quite depressing that the data from DTU will always lose frames. Even if the DMA idle receiving mode is used, Er will lose one.
The biggest possibility is the conflict between data upload and receiving, or the interruption priority is preemptible.
Build a small Iot Platform Based on ZigBee