Action Required! Starting November 21st, 2022, Nest Hubs opted into the Preview Program are being updated to support Matter 1.0 in anticipation of Google's general availability (GA) of Matter. All Matter devices being used with the Preview Program will need to be updated. See the Release Notes for more details.

Nordic Semiconductor

Stay organized with collections Save and categorize content based on your preferences.

nRF52840

This example functions as a light bulb device type, with on/off capabilities. The steps were verified on an nRF52840 development board.

This example uses a test Vendor ID (VID) and a Product ID (PID) of 0x8005.

Initial setup

  1. Install the nRF Command Line Tools.
  2. Install SEGGER J-Link Software.
  3. Install nRF Connect SDK.

    1. Download nRF Connect for Desktop and run.
    2. Install and open Toolchain Manager application.
    3. Install nRF Connect SDK 2.1.0.
    4. Click the down arrow next to the version you installed and select Open Terminal or Open Bash.
  4. Clone and initialize the connectedhomeip repo:

    cd ~
    git clone https://github.com/project-chip/connectedhomeip.git
    cd connectedhomeip
    git fetch origin v1.0-branch
    git checkout a17c005209fbde737edb97b0f51ea63472c166aa
    git submodule update --init
    

  5. Update the nRF Connect SDK to the most recent supported revision:

    python3 scripts/setup/nrfconnect/update_ncs.py --update
    cd examples/lighting-app/nrfconnect
    

Build the image and flash the board

  1. Build the image:
    west build -b nrf52840dk_nrf52840
  2. Connect the board to your computer, and flash the image:
    west flash --erase

Validate the example

  1. The device should present itself as a USB serial device on your computer. You may look it up in /dev/:
    ls -la /dev/tty*
    You can open the serial console with screen or minicom. For example, if the device is at /dev/ttyACM0:
    screen /dev/ttyACM0 115200
  2. If the board has been paired before, it's recommended that you factory reset it. Long press Button 1 for >5 seconds. The LEDs should blink 3 times.
  3. Turn on BLE advertisement manually (needed for the device to be discovered by GHA). Press Button 4 on the board, and you should see a message like this in serial console:
    I: [DL] CHIPoBLE advertising started
  4. To toggle the lightbulb's state (on/off), click button Button 2. It should toggle LED2.

Next steps

When your Matter example has been successfully built, create a developer project.