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
- Install the nRF Command Line Tools.
- Install SEGGER J-Link Software.
Install nRF Connect SDK.
- Download nRF Connect for Desktop and run.
- Install and open
Toolchain Manager
application. - Install
nRF Connect SDK 2.1.0
. - Click the down arrow next to the version you installed and select
Open Terminal
orOpen Bash
.
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
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
- Build the image:
west build -b nrf52840dk_nrf52840
- Connect the board to your computer, and flash the image:
west flash --erase
Validate the example
- The device should present itself as a USB serial device on your
computer. You may look it up in
/dev/
:
You can open the serial console withls -la /dev/tty*
screen
orminicom
. For example, if the device is at/dev/ttyACM0
:screen /dev/ttyACM0 115200
- 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.
- Turn on BLE advertisement manually (needed for the device to be
discovered by the Google Home app (GHA)). Press Button 4 on the board,
and you should see a message like this in serial console:
I: [DL] CHIPoBLE advertising started
- 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.