Is there, or can we/I create, a user forum to share development questions? Getting the Matter Light sample to work.

Users can often help each other and not rely on your staff.

I am trying to join a sample/matter_light_bulb sample to a newly formed Matter network.

The problem I describe below might be able to be solved by the user community.

I hate to keep bothering your support staff.

--------

After getting the BLE and Thread samples working I tried to move on to the Matter demos.

I created and configured the OTBR and pulled its pskc credential.  Does a thread need to be created first??

pi@otbr:~ $ sudo ot-ctl

dataset active -x
0e080000000000010000000300000e35060004001fffe002089cc49a9d067f70520708fdb36a43005d307305108b3d8982714220c637e513253a515ed9030f4f70656e5468726561642d32326166010222af04105f71e038e9fd24e1bdc8dbaf52deb52b0c0402a0fff8
Done

I compiled the Matter/CHIP Python tool on the same pi as the OTBR and ran the commands.

pi@otbr:~ $ cd connectedhomeip/
pi@otbr:~/connectedhomeip $ source out/python_env/bin/activate

(python_env) pi@otbr:~/connectedhomeip $ sudo out/python_env/bin/chip-device-ctrl

[1646772553.244756][9968:9968] CHIP:DL: writing settings to file (/tmp/chip_counters.ini-BnjoeV)
[1646772553.245435][9968:9968] CHIP:DL: renamed tmp file to file (/tmp/chip_counters.ini)
[1646772553.245609][9968:9968] CHIP:DL: NVS set: chip-counters/reboot-count = 2 (0x2)
[1646772553.246196][9968:9968] CHIP:DL: Got Ethernet interface: eth0
[1646772553.246602][9968:9968] CHIP:DL: Found the primary Ethernet interface:eth0
[1646772553.246996][9968:9968] CHIP:DL: Got WiFi interface: wlan0
[1646772553.249343][9968:9968] CHIP:DL: Found the primary WiFi interface:wlan0
[1646772553.249689][9968:9973] CHIP:DL: Platform main loop started.
2022-03-08 15:49:13 otbr root[9968] CRITICAL Loading configuration from /tmp/chip-device-ctrl-storage.json...
2022-03-08 15:49:13 otbr chip.IN[9968] INFO Loading certs from storage
2022-03-08 15:49:13 otbr chip.DL[9968] INFO writing settings to file (/tmp/chip_counters.ini-sGKBAU)
2022-03-08 15:49:13 otbr chip.DL[9968] ERROR renamed tmp file to file (/tmp/chip_counters.ini)
2022-03-08 15:49:13 otbr chip.DL[9968] INFO NVS set: chip-counters/GlobalMCTR = 2000 (0x7D0)
2022-03-08 15:49:13 otbr root[9968] INFO SetSdkKey: gcc = b'\xd0\x07\x00\x00'
2022-03-08 15:49:13 otbr root[9968] INFO SetSdkKey: gdc = b'\xd0\x07\x00\x00'
2022-03-08 15:49:13 otbr chip.ZCL[9968] INFO Using ZAP configuration...
2022-03-08 15:49:13 otbr chip.DL[9968] INFO Avahi client registered
2022-03-08 15:49:13 otbr chip.IN[9968] INFO CASE Server enabling CASE session setups
2022-03-08 15:49:13 otbr chip.DIS[9968] INFO Advertise operational node C2E71B3D2FB3122E-B60A53F0B0CFE584
2022-03-08 15:49:13 otbr chip.DL[9968] INFO PublishService C2E71B3D2FB3122E-B60A53F0B0CFE584._matter._tcp41651.-1
2022-03-08 15:49:13 otbr chip.DIS[9968] INFO mDNS service published: _matter._tcp
2022-03-08 15:49:13 otbr chip.DIS[9968] INFO Have operational credentials
2022-03-08 15:49:13 otbr chip.DIS[9968] INFO Advertise commission parameter vendorID=65521 productID=32769 discriminator=3840/15
2022-03-08 15:49:13 otbr chip.DL[9968] INFO PublishService A5A4DDA9203C609E._matterd._udp5550.-1
2022-03-08 15:49:13 otbr chip.DIS[9968] INFO mDNS service published error: ../../src/platform/Linux/DnssdImpl.cpp:482: CHIP Error 0x000000AC: Internal error
2022-03-08 15:49:13 otbr chip.DIS[9968] ERROR Failed to advertise commissioner: ../../src/platform/Linux/DnssdImpl.cpp:482: CHIP Error 0x000000AC: Internal error
New FabricAdmin: FabricId: 1(1)
2022-03-08 15:49:13 otbr root[9968] INFO SetReplKey: fabricAdmins = {'1': {'fabricId': 1}}
Allocating new controller with FabricId: 1(1), NodeId: 1
2022-03-08 15:49:13 otbr chip.CTL[9968] INFO Generating NOC
2022-03-08 15:49:13 otbr chip.DIS[9968] INFO Verifying the received credentials
2022-03-08 15:49:13 otbr chip.DIS[9968] INFO Added new fabric at index: 1, Initialized: 1
2022-03-08 15:49:13 otbr chip.DIS[9968] INFO Assigned compressed fabric ID: 0xC2E71B3D2FB3122E, node ID: 0xB61463F0B0CFE584
2022-03-08 15:49:13 otbr chip.CTL[9968] INFO Joined the fabric at index 1. Compressed fabric ID is: 0xC2E71B3D2FB3122E
2022-03-08 15:49:13 otbr chip.DIS[9968] INFO Advertise operational node C2E71B3D2FB3122E-B61463F0B0CFE584
2022-03-08 15:49:13 otbr chip.DL[9968] INFO PublishService C2E71B3D2FB3122E-B61463F0B0CFE584._matter._tcp41651.-1
2022-03-08 15:49:13 otbr chip.DIS[9968] INFO mDNS service published error: ../../src/platform/Linux/DnssdImpl.cpp:482: CHIP Error 0x000000AC: Internal error
2022-03-08 15:49:13 otbr ChipBLEMgr[9968] DEBUG add adapter signal
2022-03-08 15:49:14 otbr chip.DL[9968] INFO Avahi group established
2022-03-08 15:49:20 otbr chip.DL[9968] INFO Avahi re-register required
2022-03-08 15:49:20 otbr chip.DL[9968] INFO PublishService C2E71B3D2FB3122E-B60A53F0B0CFE584._matter._tcp41651.-1
2022-03-08 15:49:20 otbr chip.DIS[9968] INFO mDNS service published: _matter._tcp
2022-03-08 15:49:20 otbr chip.DL[9968] INFO Avahi re-register required
2022-03-08 15:49:20 otbr chip.DL[9968] INFO PublishService C2E71B3D2FB3122E-B60A53F0B0CFE584._matter._tcp41651.-1
2022-03-08 15:49:20 otbr chip.DIS[9968] INFO mDNS service published: _matter._tcp
2022-03-08 15:49:20 otbr chip.DL[9968] INFO Avahi client registered
2022-03-08 15:49:20 otbr chip.DIS[9968] INFO Advertise operational node C2E71B3D2FB3122E-B61463F0B0CFE584
2022-03-08 15:49:20 otbr chip.DL[9968] INFO PublishService C2E71B3D2FB3122E-B61463F0B0CFE584._matter._tcp41651.-1
2022-03-08 15:49:20 otbr chip.DIS[9968] INFO mDNS service published: _matter._tcp
2022-03-08 15:49:20 otbr chip.DIS[9968] INFO Have operational credentials
2022-03-08 15:49:20 otbr chip.DIS[9968] INFO Advertise commission parameter vendorID=65521 productID=32769 discriminator=3840/15
2022-03-08 15:49:20 otbr chip.DL[9968] INFO PublishService A5A4DDA9203C609E._matterd._udp5550.-1
2022-03-08 15:49:20 otbr chip.DIS[9968] INFO mDNS service published error: ../../src/platform/Linux/DnssdImpl.cpp:482: CHIP Error 0x000000AC: Internal error
2022-03-08 15:49:20 otbr chip.DIS[9968] ERROR Failed to advertise commissioner: ../../src/platform/Linux/DnssdImpl.cpp:482: CHIP Error 0x000000AC: Internal error
2022-03-08 15:49:20 otbr chip.DL[9968] INFO Avahi re-register required
2022-03-08 15:49:20 otbr chip.DL[9968] INFO PublishService C2E71B3D2FB3122E-B61463F0B0CFE584._matter._tcp41651.-1
2022-03-08 15:49:20 otbr chip.DIS[9968] INFO mDNS service published: _matter._tcp
2022-03-08 15:49:21 otbr chip.DL[9968] INFO Avahi group established
2022-03-08 15:49:21 otbr chip.DL[9968] INFO Avahi group established
2022-03-08 15:49:22 otbr chip.DL[9968] INFO Avahi client registered
2022-03-08 15:49:22 otbr chip.DIS[9968] INFO Advertise operational node C2E71B3D2FB3122E-B61463F0B0CFE584
2022-03-08 15:49:22 otbr chip.DL[9968] INFO PublishService C2E71B3D2FB3122E-B61463F0B0CFE584._matter._tcp41651.-1
2022-03-08 15:49:22 otbr chip.DIS[9968] INFO mDNS service published: _matter._tcp
2022-03-08 15:49:22 otbr chip.DIS[9968] INFO Have operational credentials
2022-03-08 15:49:22 otbr chip.DIS[9968] INFO Advertise commission parameter vendorID=65521 productID=32769 discriminator=3840/15
2022-03-08 15:49:22 otbr chip.DL[9968] INFO PublishService A5A4DDA9203C609E._matterd._udp5550.-1
2022-03-08 15:49:22 otbr chip.DIS[9968] INFO mDNS service published error: ../../src/platform/Linux/DnssdImpl.cpp:482: CHIP Error 0x000000AC: Internal error
2022-03-08 15:49:22 otbr chip.DIS[9968] ERROR Failed to advertise commissioner: ../../src/platform/Linux/DnssdImpl.cpp:482: CHIP Error 0x000000AC: Internal error
2022-03-08 15:49:22 otbr chip.DL[9968] INFO Avahi group established

set-pairing-thread-credential 0e080000000000010000000300000e35060004001fffe002089cc49a9d067f70520708fdb36a43005d307305108b3d8982714220c637e513253a515ed9030f4f70656e5468726561642d32326166010222af04105f71e038e9fd24e1bdc8dbaf52deb52b0c0402a0fff8

This output seems to keep cycling on the CHIP controller

2022-03-08 15:55:20 otbr chip.DL[9968] INFO Avahi re-register required
2022-03-08 15:55:20 otbr chip.DL[9968] INFO PublishService C2E71B3D2FB3122E-B61463F0B0CFE584._matter._tcp41651.-1
2022-03-08 15:55:20 otbr chip.DIS[9968] INFO mDNS service published: _matter._tcp
2022-03-08 15:55:21 otbr chip.DL[9968] INFO Avahi group established
2022-03-08 15:55:21 otbr chip.DL[9968] INFO Avahi group established
2022-03-08 15:55:22 otbr chip.DL[9968] INFO Avahi client registered
2022-03-08 15:55:22 otbr chip.DIS[9968] INFO Advertise operational node C2E71B3D2FB3122E-B61463F0B0CFE584
2022-03-08 15:55:22 otbr chip.DL[9968] INFO PublishService C2E71B3D2FB3122E-B61463F0B0CFE584._matter._tcp41651.-1
2022-03-08 15:55:22 otbr chip.DIS[9968] INFO mDNS service published: _matter._tcp
2022-03-08 15:55:22 otbr chip.DIS[9968] INFO Have operational credentials
2022-03-08 15:55:22 otbr chip.DIS[9968] INFO Advertise commission parameter vendorID=65521 productID=32769 discriminator=3840/15
2022-03-08 15:55:22 otbr chip.DL[9968] INFO PublishService A5A4DDA9203C609E._matterd._udp5550.-1
2022-03-08 15:55:22 otbr chip.DIS[9968] INFO mDNS service published error: ../../src/platform/Linux/DnssdImpl.cpp:482: CHIP Error 0x000000AC: Internal error
2022-03-08 15:55:22 otbr chip.DIS[9968] ERROR Failed to advertise commissioner: ../../src/platform/Linux/DnssdImpl.cpp:482: CHIP Error 0x000000AC: Internal error
2022-03-08 15:55:23 otbr chip.DL[9968] INFO Avahi group established

chip-device-ctrl > set-pairing-wifi-credential <my_ssid> <my psk>

But the BLE scan is finding my matter_light sample

chip-device-ctrl > ble-scan

2022-03-08 15:36:34 otbr ChipBLEMgr[1419] INFO scanning started
2022-03-08 15:36:34 otbr ChipBLEMgr[1419] INFO Name            = MatterLight
2022-03-08 15:36:34 otbr ChipBLEMgr[1419] INFO ID              = 766dcf2a-2adf-37fc-abbc-b104dd4e0ec4
2022-03-08 15:36:34 otbr ChipBLEMgr[1419] INFO RSSI            = -40
2022-03-08 15:36:34 otbr ChipBLEMgr[1419] INFO Address         = C0:CC:B1:1F:DE:03
2022-03-08 15:36:34 otbr ChipBLEMgr[1419] INFO Adv UUID        = 0000fff6-0000-1000-8000-00805f9b34fb
2022-03-08 15:36:34 otbr ChipBLEMgr[1419] INFO Adv Data        = 00000f5a234c4e00
2022-03-08 15:36:34 otbr ChipBLEMgr[1419] INFO

When I try the next step it fails with the following

chip-device-ctrl > connect -ble 3840 20202021 1234  <-- these match what is output from the UART of the nrf52840dk that is loaded with the light bulb sample. I press button-4 prior.

Device is assigned with nodeid = 1234
2022-03-08 16:02:07 otbr chip.IN[9968] INFO Prepared unauthenticated message 0xb0cfdecc to 0x0000000000000000 (0)  of type 0x20 and protocolId (0, 0) on exchange 50817i with MessageCounter:887426576.
2022-03-08 16:02:07 otbr chip.IN[9968] INFO Sending unauthenticated msg 0xb0cfdecc with MessageCounter:887426576 to 0x0000000000000000 at monotonic time: 1869204 msec
2022-03-08 16:02:07 otbr chip.CTL[9968] INFO Commission called for node ID 0x00000000000004D2
2022-03-08 16:02:07 otbr chip.CTL[9968] INFO Setting thread operational dataset from parameters
2022-03-08 16:02:07 otbr chip.CTL[9968] INFO Setting wifi credentials from parameters
2022-03-08 16:02:07 otbr chip.CTL[9968] INFO Setting attestation nonce to random value
2022-03-08 16:02:07 otbr chip.CTL[9968] INFO Setting CSR nonce to random value
2022-03-08 16:02:07 otbr chip.BLE[9968] INFO BLE removing known devices.
2022-03-08 16:02:07 otbr chip.BLE[9968] INFO BLE initiating scan.
2022-03-08 16:02:37 otbr chip.SC[9968] ERROR PASESession timed out while waiting for a response from the peer. Expected message type was 33
Failed to establish secure session to device: 50
CHIP Error 0x00000032: Timeout
chip-device-ctrl >

Related