โ ๏ธ : you might need to install libreadline-dev lib32ncurses5-dev before building the project
$ apt-get install libreadline-dev
$ apt-get install lib32ncurses5-dev
to build de the project just go to the project files and run make
cd src/Z3GatewayHost
make
the project is generated at src/Z3GatewayHost/build/exe/Z3GatewayHost_Sectronic.exe
just run it with ./Z3GatewayHost_Sectronic.exe -n 0 -p /dev/ttyUSB0
- create network
plugin network-creator start 1
- display device-table
plugin device-table print
- open network
plugin network-creator-security open-network
- send ON command
zcl on-off on
plugin device-table send {<deviceEui>} <deviceEndpoint>
set your device tty in .env with DEVICE_TTY=/dev/my_efr
echo "DEVICE_TTY=/dev/my_efr" > .env
run
./manage.sh build
run
./manage.sh run
run
docker logs -f --tail=100 z3host
Use this command to attach to Z3GatewayHost CLI
run
docker attach z3host
CLI: info
description: get Gateway information
CLI: plugin network-creator start 1
description: create zigbee network
CLI: plugin network-creator-security open-network
description: open-network
CLI: network broad-pjoin 0x78
CLI params: network broad-pjoin <seconds:2>
description: open network
CLI: plugin network-creator-security close-network
description: close network
CLI: plugin device-table print
description: display devices paired to the gateway
CLI: zdo bind 0xF563 0x2 0x1 0x0006 {84B4DBFFFE27C26E} {588E81FFFE9A3394}
CLI params: zdo bind <nodeID:2> <deviceEP:1> <gatewayEP:1> <clusterID:2> <deviceEUI64> <gatewayEUI64>
description: bind and endpoint cluster to the gateway
CLI: zdo mgmt-bind 0xFB9E 0
CLI params: zdo mgmt-bind <nodeID:2> <statartIndex>
description: display binding table for a given device
CLI:
zcl global read 0x0000 0x0000
plugin device-table send {086BD7FFFE5CB4C4} 1
CLI params:
zcl global read <cluserID:2> <attributeID:2>
plugin device-table send {<deviceEUI64>} <deviceEP:1>
description: read cluster attibute value of a device
CLI:
zcl global send-me-a-report 0x0006 0x0000 0x10 0x0001 0x0078 {01}
plugin device-table send {086BD7FFFE5CB4C4} 1
CLI params:
zcl global send-me-a-report <clusterID:2> <attributeId:2> <dataType:1> <minReportTime:2> <maxReportTime:2> <reportableChange:->1
plugin device-table send {<deviceEUI64>} <deviceEP:1>
CLI: zcl on-off on
CLI: plugin device-table send {<deviceEui>} <deviceEndpoint>
CLI: zcl on-off toggle
CLI: plugin device-table send {<deviceEui>} <deviceEndpoint>
CLI: zcl on-off off
CLI: plugin device-table send {<deviceEui>} <deviceEndpoint>
You can find already generated ncp application and bootload images in Z3GatwayHost/bootloader
For the board EF32xG21 2.4 GHz 10dBm RB (efr32mg21a020f1024im32-brd4180a) we need to create a new project uart xmodem.
- Plug the board to your computer
- In SimplicityStudio, [File] > [New] > [SiliconLabs Project Wizard]
- ensure your board is connected
- [Next]
- filter on zigbee examples project
- select the NCP UART HW (Hardware Flow Control)
- [Next]
- [Finish]
- Generate project files
- Build project
application image path: C:\...\SimplicityStudio\v5_workspace\ncp-uart-hw\GNU ARM v10.2.1 - Default\ncp-uart-hw.s37
bootloader image path: C:\SiliconLabs\SimplicityStudio\v5\developer\sdks\gecko_sdk_suite\v3.2\platform\bootloader\sample-apps\bootloader-storage-internal-single\efr32mg21a020f1024im32-brd4180a\bootloader-storage-internal-single.s37
- Plug the board to your computer
- right click on the board, select [Upload Application]
- select your application image
- select the bootloader image
- select erase chip
- [OK]
- unplug and re plug your board