This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Zigbee Gateway OTA Server bug? recv: Interrupted system call



I am hoping someone can assist me with a bug I believe I am observing When utilizing the Zigbee Gateway OTA server. The steps I have implemented include:

1) I utilized the ZED_OTA_Client example and verified I was able to successfully update the example application

2) I ported the OTA example to our project using the instructions provided here: Zigbee Over-The-Air Firmware Upgrade — SimpleLinkTm CC13XX/CC26XX SDK Z-Stack User's Guide 5.40.00 documentation

3) I also update the offchip_BIM source to work with our onboard external flash.

 

When I initiate the OTA update in the Zigbee Gateway everything seems to work fine initially, and I can get in some cases up to 11% of the image downloaded and then the download simply stops. I have analyzed the zigbee packets with a sniffer and I do not see any obvious issues (ie. The Image Block Response has an appropriate ACK).

One thing I did notice is that the zigbeeHAgw does seem to consistently report an error just before the download stops working. This error is “recv: Interrupted system call”. I’ve attached a log which illustrates this.

 

 

And then a few lines later there is an ERROR for a failed response.

 

Do anyone have any insight as to what may be causing this interrupted system call, what it may indicate and how I may resolve it? Please let me know if I can provide any more details that would be helpful.

/cfs-file/__key/communityserver-discussions-components-files/158/server.txt

  • Hi Matt,

    Can you update the original zed_ota_client example with the Zigbee Gateway successfully?  Are you able to update your custom software with the OtaServer tool?  This error is similar to the report from another E2E thread, can you please review and determine whether Toby's recommendations resolve the issue?  It appears that the end device is also reporting attributes throughout the OTA update, I'm curious as to whether disabling this feature or reducing its frequency would alter the behavior.

    Regards,
    Ryan

  • I have applied the patch from the linked E2E post. The zed_ota_client example works most of the time, however occasionally it also sees the same error. I also noticed if our custom device was connected to the network the zed_ota_client example failed. 


    I am able to succesfully update my custom software using the OtaServerTool.

    Since the OtaServerTool works it seems to point to an issue with the Gateway?

    Are there other patches for the Zigbee Gateway available that I should be applying? Is there an updated repo for the Gateway?

  • You could try increasing the expirytime.tv_sec timeout from <gateway install>/source/Projects/zstack/linux/srvwrapper/api_client.c to compensate for any unexpected delays from the ZNP. 

    The zed_ota_client example works most of the time, however occasionally it also sees the same error. I also noticed if our custom device was connected to the network the zed_ota_client example failed. 

    It appears that network congestion and high packet transfer rates combined with the host interface connection is causing timeout issues.  You could consider increasing MINIMUM_IMAGE_BLOCK_REQUEST_TIMEOUT on the zed_ota_client in order to reduce the OTA image request packet frequency.  Perhaps it would also be possible to use a zr_ota_server connected to the network which handles OTA updates to reduce processing constraints on the ZNP.

    I am not aware of any further patches for the Zigbee Gateway, and the solution is provided as an example for evaluation which is not maintained or regularly updated by TI.

    Regards,
    Ryan