Matter Demo - Instructions to get the discriminator code - missing a command?

Step 5 of the Matter instructions at developer.nordicsemi.com/.../python_chip_controller_building.html

Shows getting the discriminator data.  What is shown looks like the output of some command that was entered via the shell command.

I do have access to the Zephry shell on the matter light switch demo client and I do see output to the shell showing Matter is running with some of the "I:" and "D:" output lines but I don't see how to get it to spit out the diagnostic data that is shown in step 5.

Am I missing something?  How to get that output?

Step 5: Commission the Matter accessory device over Bluetooth LE

The controller uses a 12-bit value called discriminator to discern between multiple commissionable device advertisements, as well as a 27-bit setup PIN code to authenticate the device. You can find these values in the logging terminal of the device (for example, UART). For example:

I: 254 [DL]Device Configuration:
I: 257 [DL] Serial Number: TEST_SN
I: 260 [DL] Vendor Id: 9050 (0x235A)
I: 263 [DL] Product Id: 20043 (0x4E4B)
I: 267 [DL] Hardware Version: 1
I: 270 [DL] Setup Pin Code: 20202021
I: 273 [DL] Setup Discriminator: 3840 (0xF00)
I: 278 [DL] Manufacturing Date: (not set)
I: 281 [DL] Device Type: 65535 (0xFFFF)
  • Not sure where the output shown above is coming from but I did find the commands to query the data separately.

    Using Matter-specific commands

    The nRF Connect examples let you use several Matter-specific CLI commands.

    These commands are not available by default and to enable using them, set the CONFIG_CHIP_LIB_SHELL=y Kconfig option in the prj.conf file of the given example.

    Every invoked command must be preceded by the matter prefix.

    See the following subsections for the description of each Matter-specific command.

    device

    Handles a group of commands that are used to manage the device. You must use this command together with one of the additional subcommands listed below.

    factoryreset

    Performs device factory reset that is hardware reset preceded by erasing of the whole Matter settings stored in a non-volatile memory.

    uart:~$ matter device factoryreset
    Performing factory reset ...
    

    onboardingcodes

    Handles a group of commands that are used to view information about device onboarding codes. The onboardingcodes command takes one required parameter for the rendezvous type, then an optional parameter for printing a specific type of onboarding code.

    The full format of the command is:

    onboardingcodes none|softap|ble|onnetwork [qrcode|qrcodeurl|manualpairingcode]
    

    To print all the onboardingcodes:

    uart:~$ matter onboardingcodes none
    QRCode:             MT:W0GU2OTB00KA0648G00
    QRCodeUrl:          dhrishi.github.io/.../qrcode.html=MT%3AW0GU2OTB00KA0648G00
    ManualPairingCode:  34970112332
    
  • Using the Matter-Specific commands, I can only seem to get some of the data items to print out.  The hardware and vendor IDs are OK but all of the pairing data is blank.

    Is there some operational prerequisite after flashing the demos to get the CLI to spit out the pairing data (ie qrcodes, pins etc)?

  • Hi,

    Most likely you are not able to get the commissioning data from the shell because of the reason mentioned in the "Test mode" section in the sample documentation for the Matter Light Switch:

    "Unlike other samples, such as Matter door lock, this sample does not support Matter commissioning over BluetoothRegistered LE. To enable communication between the light switch and the light bulb devices, they must be initialized with the same static Thread network parameters and static Matter cryptographic keys."

    I tested the Matter door lock sample, and there I can get the output from the onboardingcodes command.

    Best regards,
    Jørgen

  • Thank you.  I did notice on the benchtop lab I have that the light bulb sample did print out the commissioning data but the light switch did not.

    I must have missed that note.

    I'll try the lock demo too.

    Thank you.

Related