Zigbee NCP UART Loader - markding/iot-developer-boot-camp GitHub Wiki
Table of Contents
When we upgrade Host + NCP platform, we have to make a choice about which one should be upgraded first. In this case, we would suggest you upgrade the NCP first. The reason is that the EZSP version may be upgraded in the newer version. If you upgrade the host first, then you won't be able to connect to the NCP.
But in fact, what customer needs is a more easy-to-use upgrader. It can upgrade NCP firmware regardless of the current version. This example introduces a standalone NCP UART Loader, so that users can upgrade NCP of any version.
Gecko SDK Suite 2.7.
- BRD4167A
Connect the WSTK to PC through USB cable
- Create the Z3GatewayHost sample project, name it with
ncp-uart-loader
. - In "ZCL Clusters" tab, select endpoint 1, then enable the client side of cluster
Over The Air Bootloading
; - Select the following plugins:
- OTA Bootload Cluster Client
- OTA Bootload Cluster Client Policy
- OTA Cluster Platform Bootloader
- Save and generate the project.
- Uncompress the ncp_uart_loader example in this project, replace the makefile with the one in this example.
- Extract the source file
ncp-uart-loader.c
,ncp-uart-loader.h
andstub.c
to your project folder. - Make and test.
-
Use a WSTK as the NCP. Flash a bootloader
bootloader-xmodem-uart
and the NCP-UART firmware; -
Connect the WSTK to PC, start the
ncp-uart-loader
program on Cygwin to test.$ ./ncp_uart_loader.exe -p COM28 ezsp ver 0x8 stack type 0x2 stack ver. [6.7.6 0x41fa49 build 327] Found OTA file 'ncp-uart-hw.ota' Manufacturer ID: 0x1002 Image Type ID: 0x0000 Version: 0x00000014 Header String: EBL ncp-uart-hw Found 1 files Launching standalone bootloader... Starting bootloader communications. Delaying 4 seconds Setting up serial port Transferring EBL file to NCP... EBL data start: 0x 3E, end: 0x2C72E, size: 182000 bytes 0x41e266: 0% complete 0x41e266: 5% complete 0x41e266: 10% complete 0x41e266: 15% complete 0x41e266: 20% complete 0x41e266: 25% complete 0x41e266: 30% complete 0x41e266: 35% complete 0x41e266: 40% complete 0x41e266: 45% complete 0x41e266: 50% complete 0x41e266: 55% complete 0x41e266: 60% complete 0x41e266: 65% complete 0x41e266: 70% complete 0x41e266: 75% complete 0x41e266: 80% complete 0x41e266: 85% complete 0x41e266: 90% complete 0x41e266: 95% complete 0x41e266: 100% complete Transfer completed successfully. Delaying 4 seconds Rebooting NCP Delaying 4 seconds Reboot not supported. Exiting instead.
The project is a host program. It can be easily ported to Unix-like systems with the same approaches of porting the Z3GatewayHost sample.
NA