Commission ACK-based Matter Devices


To commission your device to the Matter network, you use the Matter chip-tool. Commissioning uses the Product Attestation Intermediate (PAI) certificate and private key to establish the authenticity of a new device. The device uses its certification declaration (CD) to prove its compliance with the Matter protocol.

Prerequisites

Before you start, make sure that you have the following items:

  • Alexa app on a mobile device.
  • In Settings on your mobile device, allow the Alexa app to access the camera.
  • Matter-compatible Amazon Echo device. For a list of devices, see Compatible Echo and eero devices.
  • Connect the Echo device to the same Amazon developer account as the Alexa app.
  • Connect the Echo device to a 2.4 GHz Wi-Fi network.
  • Connect the development kit to a USB port on your host machine.

Before you can run commands on the development kit, connect your host machine to the kit. If your host machine is an Ubuntu VM or a Mac, use the screen command in a terminal window. For Windows, use PuTTY.

Create a new device discriminator (Optional)

To test multiple devices, generate a new discriminator for each device so that the Matter commissioner can distinguish between each device advertising to join the network.

To generate a new discriminator

  1. In a terminal window on your development kit, enter the following command to generate a new discriminator.
    Set <discrimator-value> to a value between 0000 and 4095, inclusive.

Copied to clipboard.

    mack set-attr discriminator=<discrimator-value>
  1. To apply the discriminator, enter the following command to reboot the development kit.

Copied to clipboard.

    reset reboot

Commission the device with Alexa

Using the Alexa app, you commission the device to the Matter network using Wi-Fi over Bluetooth Low Energy (BLE). Make sure that you sign in to the Alexa app with your Amazon developer account.

To add your ACK-based device to the Alexa app

  1. On your mobile device, open the Alexa app.
  2. On the Alexa app, navigate to the Devices page, and then tap the plus sign (+).
  3. Tap Add Device, and then from list of devices, select Other.
  4. For Which logo is on your device?, tap Matter, and then for Does your device have a Matter logo, tap Yes.
  5. For Is your device powered on?, tap Yes.
  6. Connect your host machine to the development kit.
    For details, see Connect your host machine to the development kit.
  7. To get the QR code for the setup, enter the following command in a terminal window.
    The command displays a QR code link similar to Sample QR.

Copied to clipboard.

    mack show
  1. Click the link to the QR code.
  2. In the Alexa app, tap Scan QR Code.
  3. For Allow permission, tap Allow for access to the camera, and then scan the QR code with your camera.
  4. If you see This device isn't Matter compatible, that's OK. For Do you want to set up this device anyway?, tap Yes.
  5. For Connect device to Wi-Fi, select your Wi-Fi network, and then tap Next.
  6. For Device setup and ready to use, tap Done.
    Alexa indicates that the setup succeeded.
  7. Test the device controls in the Alexa app and by voice.

Commission the device with the CHIP tool (Optional)

You can also commission the device into the Matter network by using the chip-tool as the Matter controller. The commissioning process begins with communication over BLE between the chip-tool and the device. The process ends with confirmation sent from device to chip-tool over Wi-Fi. For more details, see Working with the CHIP Tool.

In the following steps, use these command options with chip-tool.

To commission the device

  1. In a new Ubuntu terminal window, at the command prompt, enter the following command.

Copied to clipboard.

source ./setup.sh
  1. Navigate to the Matter tools directory to find the chip-tool. You defined the directory name when you installed Matter tools.
  2. To commission the device onto the Matter network, enter the following command at the command prompt.

Copied to clipboard.

./chip-tool pairing ble-wifi <node-id> <wifi-ssid> <wifi-password> <setup-pin-code> <device-discriminator>
  1. After several seconds of log output on both the device and host running the chip-tool, you should see the following output from the chip-tool.
    CHIP:TOOL: Device commissioning completed with success
    
  2. Test the device controls with the chip-tool.

Test with the CHIP tool (Optional)

You can also test device control with the chip-tool. For more details, see Working with the CHIP Tool.

For each invocation, set the <node-id> to 12345, the same value that you used when you commissioned the device with the chip-tool.

The following table shows the chip-tool commands to test lighting features.

Command Description

chip-tool onoff on <node-id> 1

Turn on the light.

./chip-tool onoff off <node-id> 1

Turn off the light.

./chip-tool onoff toggle <node-id> 1

Toggle the light on and off.

./chip-tool levelcontrol move-to-level 98 0 0 0 <node-id> 1

Change the brightness of the light.

./chip-tool colorcontrol move-to-hue 225 0 0 0 0 <node-id> 1

Change the hue.

./chip-tool colorcontrol move-to-saturation 55 0 0 0 <node-id> 1

Change the saturation.

./chip-tool colorcontrol move-to-hue-and-saturation 225 55 0 0 0 <node-id> 1

Change the hue and saturation.

./chip-tool [onoff|levelcontrol|colorcontrol]

Help for lighting clusters.

Troubleshooting

If you encounter an error during commissioning, try the following tips:

  • To monitor device logs during commissioning, enter the following command in your VM terminal window: idf.py monitor.
  • If the Wi-Fi communication fails, make sure that the Wi-Fi router and all clients have IPv6 enabled and confirm that they can ping each other. Also, make sure the firewall setting in the router isn't blocking communication.
  • If the chip-tool doesn't receive confirmation from the device, the chip-tool reports an error, but the device thinks that commissioning succeeded. To start the commissioning process again, you must do a factory reset on the device, or erase the flash and then re-flash the image to the device. For more details, see Erase flash memory.

Was this page helpful?

Last updated: frontmatter-missing