I have connected mgm12p module via UART software flow control. I have integrated Ember Z-net pro 6.5.5 SDK to develop application on host side using Z3GatewayHost.
Now I want to update the firmware of mgm12p module over UART (which is called standalone bootloading) through my application.
It is looking like we have some plugins in EmberZNet stack which can do such thing like standalone-booloader-common, ota-bootload-common etc.
They are used to receive firmware package from external server or other zigbee nodes. Are they used to update firmware which is kept locally in different memory?
If yes then how is that possible?
If other way is possible please update me.
FYI: I don't want to use CLI mode.
Hello saumil mehta,
You can find information regarding this at:
Chapter 2.1 Performing a Serial Upload – UART XMODEM Bootloader
I referred to standalone bootloader plugin too in SDK.
But I couldn't find any API which takes image(.ZBL) from host application layer.
I have seen API that will start ncp in boot mode after which we need to transfer our file.
Is there any API from EmberZnet SDK available. Is there any sample code available for that?
OR I need to write my own logic to transfer ZBL file over UART in xmodem?
Please consider GBL instead of ZBL. I have written ZBL by mistake
I'm not sure if you have a solution yet but I have managed to do this and it is a little 'messy'...
The issue is that the Z3GatewayHost uses the serial interface for EZSP communications, as well as bootloading - and generally the serial port parameters are different!
So when you want to bootload the NCP device, you...
1. Start the standalone bootloader from Z3GatewayHost (ie call emAfStandaloneBootloaderClientLaunch())
2. Shutdown Z3GatewayHost!
3. Start an XModem transfer app (have a look at the ncp.py from the Silicon Labs Gateway for ideas).
4. Download the new gbl.
5. When complete, select "Run" from the standalone bootloader (ie send the character '2').
6. If no errors occur, shutdown the XModem transfer app!
7. Restart Z3GatewayHost!
Hope this helps. If anyone has the "correct" or even a better procedure I'd like to hear it.
Sorry for late reply as I have resumed this activity now.
So I have followed that procedure and to do that I have used functions from protocol/zigbee/app/framework/plugin/ota-bootload/ota-bootload-ncp-uart.c
I have called functions in sequence as per below:
4. Transfer my file
With this it is giving error in step 3 that is "Error: Timeout occurred waiting for read data."
I can see serial interface is open and it is waiting for bootloder prompt <BL> and in that it is facing error.
Do any one has any Idea about this?
What OS/platform are you developing on? I will do some testing here...