Wednesday, April 29, 2020

How to run node server with EmberZnet 6.7.3 Z3GatewayHost on Raspberry Pi.

Although Silicon Labs deprecates UG129: zigbee® Gateway Reference Design User's Guide, the following steps show you how to run node server with EmberZnet 6.7.3 Z3GatewayHost on Raspberry Pi.

1. Install the Raspbian Jessie Lite operating system on the SD card and start Raspberry Pi to ssh login.

2. Run the following command on console to install node server.

sudo chmod 666 /etc/apt/sources.list
sudo echo deb http://devtools.silabs.com/solutions/apt jessie main >> /etc/apt/sources.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 90CE4F77
sudo apt-get update
sudo apt-get -y install silabs-zigbee-gateway
sudo apt-get -y install silabs-networking


3. Do "sudo reboot" to restart Raspberry Pi.

4. Login Raspberry Pi again and run "sudo service siliconlabsgateway stop" to stop siliconlabsgateway service.

5. Upload modified NCP.py and Z3GatewayHost to your Raspberry Pi root folder.

6.
  • Do "cd /opt/siliconlabs/zigbeegateway/tools/ncp-updater/" to switch to original NCP.py folder and make a copy of original NCP.py with "sudo mv ncp.py ncp-ori.py" if you want. 
  • Copy modified from Raspberry Pi root folder to /opt/siliconlabs/zigbeegateway/tools/ncp-updater/ using "sudo cp ~/ncp6.7.3.py ./ncp.py". 
  • Run "sudo chmod 777 ncp.py"
  • Run "sudo python ncp.py scan" and make sure you see the following response.



7.
  • Do "cd /opt/siliconlabs/zigbeegateway/bin" and run "sudo mv siliconlabsgateway siliconlabsgateway-ori" to make a copy of original siliconlabsgateway if you want. 
  • Copy Z3GatewayHost from Raspberry Pi root folder to /opt/siliconlabs/zigbeegateway/bin using "sudo cp ~/Z3GatewayHost ./siliconlabsgateway".
  • Run "sudo chmod 777 siliconlabsgateway" 
8. Run "sudo reboot" to restart Raspberry Pi and you can access to web service of Z3GatewayHost node server later.



9. If you want to build Z3GatewayHost by yourself, remember to enable all MQTT related and cJSON plugin to generate source codes.




1 comment:

  1. Sun May .你好!!想請教關於你實作 Z3Gateway 第6點把檔案放入到Raspberry pi 的root 目錄,是要如何辦到?由於有權限,我跟著你步驟會出現無法放入檔案到root 目錄裡. 謝謝

    ReplyDelete