Other Parts Discussed in Thread: Z-STACK,
Hi everyone,
We've been building up a zigbee system using ESP8266 and CC2530, at coordinator we use ESP8266 as wifi module and SoC and it will download OTA package from cloud server when OTA process begin, then send the file piece by piece to CC2530 zigbee master through UART on the same board, then CC2530 master send to CC2530 zigbee device using Z-stack through zigbee.
So the flow is like below:
Server --> [ESP8266 UART to CC2530] -> CC2530 Zigbee device
After some effort, we are able to run OTA smoothly when only one CC2530 end device connected to the coordinator, it is still fine even there are 4 or 5 end devices connected at the same time. We designed the process to OTA one end device only even if there are multiple end devices connected. All end devices can OTA successfully one by one even with 4 or 5 end devices connected at the same time.
The problem happens when there are more than 6 or 7 devices connected. In that condition we start to see one of below errors randomly and they prevent OTA from finishing. Although we design the OTA process to retry automatically, because of the two problems below, It may take more than 8 hours for one end device to OTA successfully in that situation and sometimes even no success after 12 hours.
Error 1: After zigbee end device send Image Block Requests, ESP8266 reply Image Block Response through UART, but zigbee device will not receive and eventually reply Abort.
Error 2. After all OTA Image file transmitted successfully without Error 1 happening, zigbe end device reply invalid image. (#define ZCL_STATUS_INVALID_IMAGE 0x96)
Because it all works perfectly when doing OTA 1 on 1 or with few end devices connected, I am wondering is there any limitation on the Z-stack that may cause above problem? Or does anyway have similar experience that can share some thoughts?
Thank you in advance.