tree: 6d35bbbe278870f2e315935a452c42231e94492a [path history] [tgz]
  1. include/
  2. src/
  3. third_party/
  4. CMakeLists.txt
  5. prj.conf
  6. Readme.md
examples/lighting-app/telink/Readme.md

Telink B91 EVK

Build and flash

  1. Pull docker image from repository:

    $ docker pull connectedhomeip/chip-build-telink:latest
    
  2. 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

  3. Activate the build environment:

    $ source ./scripts/activate.sh
    
  4. In the example dir run:

    $ west build
    
  5. Flash binary:

    $ west flash --erase
    

Usage

UART

To get output from device, connect UART to following pins:

NamePin
RXPB3 (pin 17 of J34 connector)
TXPB2 (pin 16 of J34 connector)
GNDGND

Buttons

The following buttons are available on tlsr9518adk80d board:

NameFunctionDescription
Button 1Factory resetPerform factory reset to forget currently commissioned Thread network and back to uncommissioned state
Button 2Lighting controlManually triggers the lighting state
Button 3Thread startCommission thread with static credentials and enables the Thread on device
Button 4Open commission windowThe button is opening commissioning window to perform commissioning over BLE

LEDs

Red LED indicates current state of Thread network. It ables to be in following states:

StateDescription
Blinks with short pulsesDevice is not commissioned to Thread, Thread is disabled
Blinls with frequent pulsesDevice is commissioned, Thread enabled. Device trying to JOIN thread network
Blinks with whde pulsesDevice commissioned and joined to thread network as CHILD

Blue LED shows current state of lightbulb

CHIP tool commands

  1. Build chip-tool cli

  2. Pair with device

    ${CHIP_TOOL_DIR}/chip-tool pairing code ${NODE_ID_TO_ASSIGN} MT:D8XA0CQM00KA0648G00
    

    here:

    • ${NODE_ID_TO_ASSIGN} is the node id to assign to the lightbulb
  3. Switch on the light:

    ${CHIP_TOOL_DIR}/chip-tool onoff on 1
    

    here:

    • onoff is name of cluster
    • on command to the cluster
    • 1 ID of endpoint
  4. Switch off the light:

    ${CHIP_TOOL_DIR}/chip-tool onoff off 1
    

    here:

    • onoff is name of cluster
    • off command to the cluster
    • 1 ID of endpoint
  5. Read the light state:

    ${CHIP_TOOL_DIR}/chip-tool onoff read on-off 1
    

    here:

    • onoff is name of cluster
    • read command to the cluster
    • on-off attribute to read
    • 1 ID of endpoint
  6. Change brightness of light:

    ${CHIP_TOOL_DIR}/chip-tool levelcontrol move-to-level 32 0 0 0 1
    

    here:

    • levelcontrol is name of cluster
    • move-to-level command to the cluster
    • 32 brightness value
    • 0 transition time
    • 0 option mask
    • 0 option override
    • 1 ID of endpoint
  7. Reag brightness level:

    ./chip-tool levelcontrol read current-level 1
    

    here:

    • levelcontrol is name of cluster
    • read command to the cluster
    • current-level attribute to read
    • 1 ID of endpoint