EFR32MG12
This example functions as a light bulb device type, with on/off capabilities. The steps were verified on SiLabs EFR32MG12 (Mighty Gecko) development board.
This example uses a test Vendor ID (VID) and a Product ID (PID) of 0x8005
.
Initial setup
- Install dependencies as specified in the
connectedhomeip
repository: - Install Simplicity
Commander
and make sure its binary (commander) is in your
PATH
. For example:export PATH=$PATH:/Applications/Commander.app/Contents/MacOS/
- Install JLink on your computer (needed for flashing image), as described in Viewing Logging Output for the EFR32 Lighting Example.
- Clone and initialize the
connectedhomeip
repo:cd ~
git clone https://github.com/project-chip/connectedhomeip.git
cd connectedhomeip
git fetch origin interop_testing_te9
git checkout FETCH_HEAD
git submodule update --init --recursive
- Export environment variables:
export EFR32_BOARD=BRD4161A
Build the image and flash the board
- Build the image for the lighting app:
The image will be generated incd examples/lighting-app/efr32
source third_party/connectedhomeip/scripts/activate.sh
gn gen out/debug --args="efr32_board=\"${EFR32_BOARD}\""
ninja -C out/debug
out/debug
folder. - Connect the EFR32 board with your computer and flash the image to your
EFR32 board:
python3 out/debug/chip-efr32-lighting-example.flash.py --erase
Validate the example
- Check logs from your board. Open two terminal windows.
- In the first window:
JLinkExe -device EFR32MG12PXXXF1024 -if JTAG -speed 4000 -autoconnect 1
- In the second window:
The logs will be printed out in the second window.JLinkRTTClient
- In the first window:
- 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 with minicom or screen. For example, if the device is atls -la /dev/tty*
/dev/ttyACM0
:
The serial console allows you to enter OpenThread commands (for example,screen /dev/ttyACM0 115200
state
). - If the EFR32 board has been paired before, it's recommended that you
factory reset it:
- Long press button PB0 for >10 seconds.
- The LEDs will blink 3 times. Keep holding the button until you see the QR code refresh on the small display.
Next steps
When your Matter example has been successfully built, create a developer project.