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.

SMARTRF06EBK: Using ZNP to upgrade OTA

Part Number: SMARTRF06EBK
Other Parts Discussed in Thread: CC2538, Z-STACK

Hello,

I am working on cc2538, it uses ZNP as coordinator and i am looking to make ZNP coordinator as my OTA upgrade server.

By referring Z-stack OTA upgrade User Guide i didn't found anything related ZNP, though i read about the OTA dongle.

Do i need to port a part of OTA_Dongle code to my ZNP coordinator, if yes how?

Is there any guide available for this?

  • I suggest you to refer to OTA implement in Z-Stack Linux GW reference design at www.ti.com/.../ZIGBEE-LINUX-SENSOR-TO-CLOUD
  • Hi Yikai,

    Actually i am looking to establish communication between my Zigbee coordinator & client over OTA. I guess this does not have any concern with linux gateway.

  • As I know, Z-Stack OTA Upgrade User's Guide.pdf is the only document.
  • If i need to use the Dongle part for my ZNP coordinator, so do i need to port the APP part of OTA_dongle to ZNP Coordinator.

    Please let me know if you are aware of it.

    Thank you.
  • No, I am not aware of it. Maybe let someone from TI to help you.
  • Hi Yikai,

    I tried sending image over my ZNP server and i am just getting the OTA notification on sniffer.

    It is not showing the data transfer over the air in sniffer. sharing my sniffer log.

    on line no. 1268 you can see the OTA notification, this notification payload contain manufacturer ID, version & type which are same to the one i entered in command line while creating the image file.

    Thank you.

    OTA_.rar

  • akshay,

    Unless you share your network key, we are unable to decrypt your sniffer log.

    As YK mentioned, I highly recommend you take a look at the Zigbee 3.0 Linux Gateway example application. It uses a ZNP as the coordinator and allows you to perform all of the different Zigbee capabilities, including OTA Upgrade. Using this application, you should be able to get a good idea on how you can implement your ZNP to act as a OTA Server.

    Best,
    Sean
  • I don't see UI for OTA in latest Zigbee 3.0 Linux Gateway example application. Can you elaborate how to do OTA test on Zigbee 3.0 Linux Gateway example application?
  • Thank you Sean and Yikai,

    I tried running the sample switch code for OTA and the image is being processed over the air & i can see on sniffer Image Block Request & Response and at the end Update End Request & response.
    so using sample code i can successfully send the image over OTA & i have tested it using a led over gpio & the old code change to the new one.
    1) Now when i want to implement the same on my own code what modification i need to do considering OTA??
    2) Referring to the sample code i have made changes in my code like i added case case ZCL_OTA_CALLBACK_IND: & copied the callback function as given in sample code. but i am not able to view the Image Block Request & Response on sniffer, can only view till Query Next Image Request & Response. Please let me know what modification i need to do more??

    is there any Manual/guide which can help me that which OTA API's need to be added or modified.

    Thank you.
  • You can refer to the Z-Stack OTA Upgrade inside the User's Guide, specifically the section 'Adding OTA Client Functionality to an Application' here: 

    When using the Z-Stack Linux Gateway sample application inside the Zigbee 3.0 Sensor-to-Cloud SDK, you can refer to Section 6.3.3.7 in the Z-Stack Linux Gateway User Guide.pdf to see on how to use OTA Upgrade.

    Best,

    Sean

  • Hi Sean,

    Tried referring the document you shared , still didn't got the exact idea as the configuration given in Z-Stack OTA Upgrade.pdf is according to code composer & i am using IAR so didn't found most of the API.

    I managed to do some changes though but when running my application (OTA implemented), for every response the image block response is showing FF:FF:FF:FF:FF..... on sniffer, but on OTA sampleswitch code it is showing proper data different for every image block response sent.

    Please let me know where can be the problem.

    Sending you attached screenshot

    Thank you

  • Is the OTA image that should be sent, a valid OTA image and did you see it get a valid OTA image header appended to it from the zOTAfileGen.exe.

    EDIT: You should be able to also run a comparison between the OTA sample switch code and a regular sample switch code to see the exact code changes required if you are confused.

  • Hi akshay,

    I haven’t heard from you for over a week, so I’m assuming you were able to resolve your issue. If this isn’t the case, please click the "This did NOT resolve my issue" button and reply to this thread with more information. If this thread locks, please click the "Ask a related question" button and in the new thread describe the current status of your issue and any additional details you may have to assist us in helping to solve your issues.

    Best,
    Sean
  • Hi Sean,

    Sorry for delayed reply,
    I was testing the OTA code & it is working fine as the client sends Query Next Image Request (here version of the client is less then version of the image file) and wait for the server command as i press 'O' from my desktop it starts sending OTA image blocks for every request and shows update end for report & response when OTA ends.
    Still i am facing following issue:

    1) When the OTA is completed updating i can see below lines on sniffer which shows the end of the OTA request & response
    49490 2572.767404 0xf71c 0x0000 ZigBee HA 57 ZCL OTA: Upgrade End Request, Seq: 249
    49492 2572.802313 0x0000 0xf71c ZigBee HA 64 ZCL OTA: Upgrade End Response, Seq: 243

    But after some time again the client sends ZCL OTA: Query Next Image Request and the server responses to this request and the same image starts sending data again. In this case the version on Query Next Image Request & Query Next Image Response are same as i can see on sniffer.
    Looks like issue of version or is there any command from Linux gateway to stop the ota when completed.

    2) I would like to know that the version, manufacturer id, type id is user defined or it is specified by TI?

    Regards,
    Akshay
  • Hey akshay,

    Apologies, I have been very busy and am just able to get back with you. Thanks for providing a response.

    So from what it looks like, is that your OTA header version is the same or greater than what is set in the application.

    Viewing this section in the Z-Stack OTA User's Guide should help out with both of your questions: dev.ti.com/.../ota_upgrade.html

    I suggest what to do is flash your original OTA image, and then instead of trying OTA with the OTA .zigbee image created from your initial compilation, change the OTA_APP_VERSION in the predefined symbols to something like 0x00000002. Then clean and rebuild your project. Then use the new OTA .zigbee image with the version 0x00000002 for the OtaServerTool.

    This should make it so that the original OTA Client application flashed on your LaunchPad and the OTA Image Header for the OTA image are matching so that the OTA Upgrade will occur. Afterwards, the application will now have an OTA version than the OtaServer and no more upgrades will take place.

    These version, manufactuer IDs and type IDs are all user defined within the post-build actions which is stated in the section I posted above :)

    Hopefully this helps!

    best,
    Sean
  • Hi Sean,

    Thanks for your reply.
    Although i have ported my code on the sample switch code for OTA and its working completely fine now, though i would definitely try to implement your suggestion.

    Regards,
    Akshay