A prototype application that demonstrates device commissioning and cluster control.
The CHIP demo application is supported on Ameba RTL8722DM Board.
-
Pull docker image:
$ docker pull pankore/chip-build-ameba:latest
-
Run docker container:
$ docker run -it -v ${CHIP_DIR}:/root/chip pankore/chip-build-ameba:latest
-
Setup build environment:
$ source ./scripts/bootstrap.sh
-
To build the demo application:
$ ./scripts/build/build_examples.py --target ameba-amebad-all-clusters build
The output image files are stored in
out/ameba-amebad-all-clusters/asdk/image
folder.The bootloader image files are stored in
out/ameba-amebad-all-clusters/asdk/bootloader
folder. -
After building the application, Ameba Image Tool is used to flash it to Ameba board.
- Connect your device via USB and open Ameba Image Tool.
- Select correct serial port and set baudrate as 115200.
- Browse and add the corresponding image files in the Flash Download list to the correct locations
- Click Download button.
There are two commissioning modes supported by Ameba platform:
-
In "connectedhomeip/config/ameba/args.gni"
- set
chip_bypass_rendezvous = false
- Set
chip_config_network_layer_ble = true
- set
-
In "connectedhomeip/src/platform/Ameba/CHIPDevicePlatformConfig.h"
- Set
#define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 1
- Set
-
Build and Flash
-
Use ATS$ command to run all-cluster example.
-
Test with Chip-Tool or Python Controller.
-
In "connectedhomeip/config/ameba/args.gni"
- set
chip_bypass_rendezvous = false
- Set
chip_config_network_layer_ble = false
- set
-
In "connectedhomeip/src/platform/Ameba/CHIPDevicePlatformConfig.h"
- Set
#define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 0
- Set
-
Build and Flash
-
Use ATS$ command to run all-cluster example.
-
Connect to AP using
ATW0, ATW1, ATWC
commands -
Test with Chip-Tool or Python Controller.
After successful commissioning, use the OnOff cluster command to control the OnOff attribute. This allows you to toggle a parameter implemented by the device to be On or Off.
-
Via Chip-Tool
$ ./chip-tool onoff on 1 $ ./chip-tool onoff off 1
-
$ chip-device-ctrl > zcl OnOff Toggle 1234 1 0