Pull docker image from repository:
$ docker pull connectedhomeip/chip-build-telink:latest
Run docker container:
$ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" connectedhomeip/chip-build-telink:latest
here ${CHIP_BASE}
is directory which contains CHIP repo files !!!Pay attention that OUTPUT_DIR should contains ABSOLUTE path to output dir
Activate the build environment:
$ source ./scripts/activate.sh
In the example dir run:
$ west build
Flash binary:
$ west flash --erase
To get output from device, connect UART to following pins:
Name | Pin |
---|---|
RX | PB3 (pin 17 of J34 connector) |
TX | PB2 (pin 16 of J34 connector) |
GND | GND |
The following buttons are available on tlsr9518adk80d board:
Name | Function | Description |
---|---|---|
Button 1 | Factory reset | Perform factory reset to forget currently commissioned Thread network and back to uncommissioned state |
Button 2 | Lighting control | Manually triggers the lighting state |
Button 3 | Thread start | Commission thread with static credentials and enables the Thread on device |
Button 4 | Open commission window | The button is opening commissioning window to perform commissioning over BLE |
Red LED indicates current state of Thread network. It ables to be in following states:
State | Description |
---|---|
Blinks with short pulses | Device is not commissioned to Thread, Thread is disabled |
Blinls with frequent pulses | Device is commissioned, Thread enabled. Device trying to JOIN thread network |
Blinks with whde pulses | Device commissioned and joined to thread network as CHILD |
Blue LED shows current state of lightbulb
Build chip-tool cli
Pair with device
${CHIP_TOOL_DIR}/chip-tool pairing code ${NODE_ID_TO_ASSIGN} MT:D8XA0CQM00KA0648G00
here:
Switch on the light:
${CHIP_TOOL_DIR}/chip-tool onoff on 1
here:
Switch off the light:
${CHIP_TOOL_DIR}/chip-tool onoff off 1
here:
Read the light state:
${CHIP_TOOL_DIR}/chip-tool onoff read on-off 1
here:
Change brightness of light:
${CHIP_TOOL_DIR}/chip-tool levelcontrol move-to-level 32 0 0 0 1
here:
Reag brightness level:
./chip-tool levelcontrol read current-level 1
here: