logo

Contents

  • Quick Start
  • Matter Project Flow
  • Visual Studio Code Development
  • API
    • CHIP on-device testing
    • CHIP on-device test dispatch
  • Discussion
    • LwIP changes for Matter
  • Guides
    • Building Matter
    • Guides
    • Access Control Guide
    • Building Android
    • Working with the CHIP Tool
    • Testing with Apple Devices
    • Matter Software Update with Infineon PSoC6 example applications
    • IP commissioning
    • Matter Python REPL
    • Mbed-OS add new hardware target
    • Matter Arm Mbed OS provisioning guide
    • Mbed-OS platform overview
    • Commissioning nRF Connect Accessory using Android CHIPTool
    • Using CLI in nRF Connect examples
    • Configuring nRF Connect examples
    • Performing Device Firmware Upgrade in the nRF Connect examples
    • Configuring factory data for the nRF Connect examples
    • nRF Connect platform overview
    • Building and Running CHIP Linux Examples for i.MX 8M Mini EVK
    • Commissioning NXP K32W using Android CHIPTool
    • Commissioning Open IoT SDK devices
    • Open IoT SDK platform port
    • Setup OpenThread Border Router on Raspberry Pi
    • Configuring OpenThread Radio Co-processor on nRF52840 Dongle
    • Using Python CHIP Controller advanced features
    • Deprecation notice
    • Building Silicon Labs EFR32 examples
    • Matter Software Update with EFR32 example applications
    • Simulated Device How-To (Linux)
    • Texas Instruments platform overview
    • Troubleshooting Avahi
    • Espressif (ESP32) Getting Started Guide
      • ESP32 Application Usage Guide
      • Using ESP32 Factory Data Provider
      • Flash and NVS encryption
      • Matter OTA
      • RPC Console and Device Tracing
      • Setup ESP-IDF and Matter Environment
  • Style Guides
    • CHIP Makefile Style Guide
    • Matter Documentation Style Guide
  • Examples
    • CHIP Ameba All Clusters Example
    • Matter CC1352 CC2652 All-clusters Example Application
    • CHIP ESP32 All Clusters Example
    • CHIP PSoC6 All Clusters Example
    • Matter Linux/Mac All Clusters Example
    • Matter Arm Mbed OS All Clusters Example Application
    • Matter nRF Connect All Clusters Example Application
    • Matter MW320 All Clusters Example Application
    • Matter Telink All Clusters Example Application
    • CHIP Ameba All Clusters Example
    • Matter CC1352 CC2652 All-clusters Example Application
    • CHIP ESP32 All Clusters Example
    • CHIP PSoC6 All Clusters Example
    • Matter Arm Mbed OS All Clusters Example Application
    • Matter nRF Connect All Clusters Example Application
    • Matter Telink All Clusters Minimal Example Application
    • CHIP ESP32 Bridge App Example
    • CHIP Linux Bridge Example
    • CHIP K32W061 Contact Sensor Example Application
    • Matter Telink Contact Sensor Example Application
    • MATTER CHEF APP
    • Matter Shell - Device Layer module
    • Matter Shell - OpenThread CLI pass-through
    • Matter Shell Reference
    • CHIP nRF Connect SDK Shell Application
    • Chef Build Conventions
    • Matter Client Example
    • Matter darwin-framework-tool
    • CHIP Linux Bridge Example
    • Matter Controller Java App Example
    • CHIP Ameba Lighting Example
    • Matter BEKEN Lighting Example
    • Bouffalo Lab
    • Matter ESP32 Lighting Example
    • Matter Genio Lighting Example
    • Matter CYW30739 Lighting Example
    • CHIP PSoC6 Lighting Example
    • CHIP Linux Lighting Example
    • Matter Arm Mbed OS Lighting Example Application
    • Matter nRF Connect Lighting Example Application
    • CHIP K32W061 Lighting Example Application
    • Python-based lighting example (bridge) device to DALI
    • Matter QPG6105 SDK
    • Matter EFR32 Lighting Example
    • Matter EFR32 Lighting Example
    • Matter Telink Lighting Example Application
    • CHIP Tizen Lighting Example
    • Matter QPG6105 Lighting Example Application
    • CHIP Ameba Light Switch Example
    • Matter ESP32 Light-switch Example
    • Matter Genio Light Switch Example
    • Matter nRF Connect Light Switch Example Application
    • Matter EFR32 Light Switch Example
    • Matter EFR32 Light Switch Example
    • Matter Telink Light Switch Example Application
    • Matter CC1352 CC2652 Lock Example Application
    • Matter CC32XXSF Lock Example Application
    • Matter ESP32 Lock Example
    • Matter Genio Lock Example
    • Matter CYW30739 Lock Example
    • Matter PSoC6 Lock Example
    • Lock Application for Linux
    • Matter Arm Mbed OS Lock Example Application
    • Matter nRF Connect Lock Example Application
    • CHIP K32W061 Lock Example Application
    • Matter Open IoT SDK Lock-App Example Application
    • Matter QPG6105 SDK
    • Matter EFR32 Lock Example
    • Matter EFR32 Lock Example
    • Matter QPG6105 Lock Example Application
    • log-source-app
    • Minimal mDNS example
    • Matter Open IoT SDK Example Application
    • CHIP ESP32 OTA Provider Example
    • ota-provider-app
    • CHIP Ameba OTA Requestor Example
    • CHIP ESP32 OTA Requestor Example
    • Matter Genio Lighting Example
    • Matter CYW30739 OTA Requestor Example
    • ota-requestor-app (Linux)
    • Matter Arm Mbed OS Lock Example Application
    • Build and flash
    • Matter CC1352 CC2652 Persistent Storage Example Application
    • CHIP EFR32 Persistent Storage Example
    • CHIP ESP32 Persistent Storage Example
    • CHIP PSoC6 Persistent Storage Example
    • CHIP Linux Persistent Storage Example
    • Matter QPG6105 SDK
    • CHIP QPG6105 Persistent Storage Application
    • CHIP Ameba Pigweed Example Application
    • CHIP EFR32 Pigweed Example Application
    • CHIP ESP32 Pigweed Example Application
    • Matter Arm Mbed OS Pigweed Example Application
    • Matter nRF Connect Pigweed Example Application
    • Matter CC1352 CC2652 Pump Example Application
    • Matter nRF Connect Pump Example Application
    • Programming and Debugging with CCS
    • Programming with UniFlash
    • Matter CC1352 CC2652 Pump Controller Example Application
    • Matter nRF Connect Pump Example Application
    • Programming and Debugging with CCS
    • Programming with UniFlash
    • Matter Shell Reference
    • Matter Shell - Device Layer module
    • Matter Shell - OpenThread CLI pass-through
    • Matter Shell - App Server module
    • Matter CC1352 CC2652 Shell Application
    • Matter Arm Mbed OS Shell Example Application
    • Matter nRF Connect SDK Shell Application
    • CHIP NXP K32W Shell Application
    • Matter Open IoT SDK Shell Example Application
    • Matter ESP32 Temperature Sensor Example
    • Matter Genio Thermostat Example
    • Matter EFR32 Thermostat Example
    • Matter Telink Thermostat Example Application
    • CHIP TV Example
    • Matter TV Casting Android App Example
    • Matter TV Casting iOS App Example
    • CHIP TV Casting App Example
    • Matter nRF Connect Window Covering Example Application
    • Matter EFR32 Window Covering Example
    • Matter EFR32 Window Covering Example
  • Reporting bugs
  • Code generation
  • Matter SDK CHIP_ERROR enums values
Theme by the Executable Book Project
  • .md
Contents
  • Build and flash
  • Usage
    • UART
    • Buttons
    • LEDs
    • CHIP tool commands
    • OTA with Linux OTA Provider

Matter Telink All Clusters Example Application

Contents

  • Build and flash
  • Usage
    • UART
    • Buttons
    • LEDs
    • CHIP tool commands
    • OTA with Linux OTA Provider

Matter Telink All Clusters Example Application#

The Telink All Clusters Example Application implements various ZCL clusters populated on three endpoints. You can use this example as a reference for creating your own application.

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:

Name

Pin

RX

PB3 (pin 17 of J34 connector)

TX

PB2 (pin 16 of J34 connector)

GND

GND

Buttons#

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

Not used

Not used

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

LEDs#

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

CHIP tool commands#

  1. Build chip-tool cli

  2. Pair with device

    ${CHIP_TOOL_DIR}/chip-tool pairing ble-thread ${NODE_ID} hex:${DATASET} ${PIN_CODE} ${DISCRIMINATOR}
    

    Example:

    ./chip-tool pairing ble-thread 1234 hex:0e080000000000010000000300000f35060004001fffe0020811111111222222220708fd61f77bd3df233e051000112233445566778899aabbccddeeff030e4f70656e54687265616444656d6f010212340410445f2b5ca6f2a93a55ce570a70efeecb0c0402a0fff8 20202021 3840
    

OTA with Linux OTA Provider#

OTA feature enabled by default only for ota-requestor-app example. To enable OTA feature for another Telink example:

  • set CONFIG_CHIP_OTA_REQUESTOR=y in corresponding “prj.conf” configuration file.

After build application with enabled OTA feature, use next binary files:

  • zephyr.bin - main binary to flash PCB (Use 2MB PCB).

  • zephyr-ota.bin - binary for OTA Provider

All binaries has the same SW version. To test OTA “zephyr-ota.bin” should have higher SW version than base SW. Set CONFIG_CHIP_DEVICE_SOFTWARE_VERSION=2 in corresponding “prj.conf” configuration file.

Usage of OTA:

  • Build the Linux OTA Provider

    ./scripts/examples/gn_build_example.sh examples/ota-provider-app/linux out/ota-provider-app chip_config_network_layer_ble=false
    
  • Run the Linux OTA Provider with OTA image.

    ./chip-ota-provider-app -f zephyr-ota.bin
    
  • Provision the Linux OTA Provider using chip-tool

    ./chip-tool pairing onnetwork ${OTA_PROVIDER_NODE_ID} 20202021
    

    here:

    • ${OTA_PROVIDER_NODE_ID} is the node id of Linux OTA Provider

  • Configure the ACL of the ota-provider-app to allow access

    ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": null, "targets": null}]' ${OTA_PROVIDER_NODE_ID} 0
    

    here:

    • ${OTA_PROVIDER_NODE_ID} is the node id of Linux OTA Provider

  • Use the chip-tool to announce the ota-provider-app to start the OTA process

    ./chip-tool otasoftwareupdaterequestor announce-ota-provider ${OTA_PROVIDER_NODE_ID} 0 0 0 ${DEVICE_NODE_ID} 0
    

    here:

    • ${OTA_PROVIDER_NODE_ID} is the node id of Linux OTA Provider

    • ${DEVICE_NODE_ID} is the node id of paired device

Once the transfer is complete, OTA requestor sends ApplyUpdateRequest command to OTA provider for applying the image. Device will restart on successful application of OTA image.

previous

Matter MW320 All Clusters Example Application

next

CHIP Ameba All Clusters Example

By Matter Contributors
© Copyright 2022, Matter Contributors.