Showing posts with label Z3Gateway. Show all posts
Showing posts with label Z3Gateway. Show all posts

Tuesday, July 26, 2022

How to build EmberZnet 7.1.0.0 Z3Gateway on Raspberry Pi.

 The following steps show you how to build EmberZnet 7.1.0.0 Z3Gateway on Raspberry Pi.

 

1. Install Simplicity Studio v5 and GSDK 4.1.0 on Ubuntu 20.04LTS. For example, GSDK 4.1.0 is installed at "~/SimplicityStudio/SDKs/gecko_sdk_2" in my test.

2. Start Simplicity Studio File->New->Silicon Labs Project Wizard... and set "Target Device" as "Linux 32 Bit" to click NEXT button.

 

3. Select "Zigbee - Host Gateway" and click NEXT button.

 

4. Make sure you set project location to under your GSDK 4.1.0 folder such as my example "/home/yk/SimplicityStudio/SDKs/gecko_sdk_2/Z3Gateway" and select "Copy contents" to click FINISH button.


5. Download and setup 2022-04-04-raspios-bullseye-armhf-lite.img for your Raspberry Pi.

6. Use sftp to copy the whole "/home/yk/SimplicityStudio" folder contents to your Raspberry Pi home folder.

7. Change direct to "~/SimplicityStudio/SDKs/gecko_sdk_2/Z3Gateway" on your Raspberry Pi and run "make -f Z3Gateway.Makefile" to build Z3Gateway

8. After build successfully, you will get Z3Gateway binary under "~/SimplicityStudio/SDKs/gecko_sdk_2/Z3Gatewaybuild/debug/". You can run Z3Gateway by "Z3Gateway -p /dev/ttyACM0" under this folder.



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.




Tuesday, April 2, 2019

How to build and run EmberZnet Z3Gateway on Raspberry Pi.

The following steps show you how to build and run EmberZnet 6.50.3 Z3Gateway on Raspberry Pi.

1. Install the Raspbian OS and Gateway Software according to section 2.3 in UG-129.

2. Set Up/Build the EMberZnet 6.50.3 Z3Gateway Application and MQTT Broker according to section 6.1.1 in UG-129.

3. Run "sudo service siliconlabsgateway stop" on Raspberry Pi console to stop siliconlabsgateway.

4. Rename built Z3GatewayHost (under sdks/gecko_sdk_suite/v2.2/app/builder/Z3GatewayHost/build/exe directory) to siliconlabsgateway and copy it to /opt/siliconlabs/zigbeegateway/bin to overwrite siliconlabsgateway under /opt/siliconlabs/zigbeegateway/bin

5. Copy the ncp.py to replace the original one under /opt/siliconlabs/zigbeegateway/tools/ncp-updater

6. Download NCP image (under C:\SiliconLabs\SimplicityStudio\v4\developer\sdks\gecko_sdk_suite\v2.5\protocol\zigbee\ncp-images\efr32mg12p432f1024gl125-brd4161a) to BRD4001+BRD4161A and connect it to Raspberry which will simulate ttyACM0 for Z3Gateway to communicate with.

7. Run "sudo service siliconlabsgateway start" on Raspberry Pi console to start siliconlabsgateway.

8. Open any browser and access to Raspberry Pi IP to test web UI of Z3Gateway