IMPORTANT: You must be part of the Matter Private Beta Program to start developing Matter devices and apps in the Google Home Developer Console. Apply now

Silicon Labs

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

  1. Install dependencies as specified in the connectedhomeip repository:
    1. Building Matter
    2. Building the EFR32 Lighting Example
  2. Install Simplicity Commander and make sure its binary (commander) is in your PATH. For example:
    export PATH=$PATH:/Applications/Commander.app/Contents/MacOS/
  3. Install JLink on your computer (needed for flashing image), as described in Viewing Logging Output for the EFR32 Lighting Example.
  4. 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
  5. Export environment variables:
    export EFR32_BOARD=BRD4161A

Build the image and flash the board

  1. Build the image for the lighting app:
    cd examples/lighting-app/efr32
    source third_party/connectedhomeip/scripts/activate.sh
    gn gen out/debug --args="efr32_board=\"${EFR32_BOARD}\""
    ninja -C out/debug
    The image will be generated in out/debug folder.
  2. 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

  1. Check logs from your board. Open two terminal windows.
    1. In the first window:
      JLinkExe -device EFR32MG12PXXXF1024 -if JTAG -speed 4000 -autoconnect 1
    2. In the second window:
      JLinkRTTClient
      The logs will be printed out in the second window.
  2. 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 minicom or screen. For example, if the device is at /dev/ttyACM0:
    screen /dev/ttyACM0 115200
    The serial console allows you to enter OpenThread commands (for example, state).
  3. If the EFR32 board has been paired before, it's recommended that you factory reset it:
    1. Long press button PB0 for >10 seconds.
    2. 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.