Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] iPhone12Mini 16.2 Bluez disconnected immediately for darwin chip-tool with rasp4 chip-lighting-app #24076

Closed
robinmo opened this issue Dec 14, 2022 · 27 comments
Labels

Comments

@robinmo
Copy link
Contributor

robinmo commented Dec 14, 2022

Reproduction steps

1.run rasp4 chip-lighting-app
2.run darwin chip-tool on iPhone12mini with iOS 16.2
3.scan the qrcode generated with chip-lighting-app link https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J0YXE00KA0648G00
4.the terminal for ssh rasp4 shows:
[1671008257.766338][3359:3362] CHIP:DL: Device 4B:50:01:11:8C:5D (Path: /org/bluez/hci0/dev_4B_50_01_11_8C_5D) Connected
[1671008258.866166][3359:3362] CHIP:DL: Bluez disconnected
[1671008258.866251][3359:3362] CHIP:DL: Bluez notify CHIPoBluez connection disconnected

Bug prevalence

Whenever I do this

GitHub hash of the SDK that was being used

9c0ca13 - Fix Linux standalone job. (#23897)

Platform

darwin

Platform Version(s)

iOS 16.2

Anything else?

rasp4 full log:

ubuntu@ubuntu:~$ apps/chip-lighting-app 
[1671008251.647105][3359:3359] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_kvs
[1671008251.652608][3359:3359] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_kvs
[1671008251.652661][3359:3359] CHIP:DL: ChipLinuxStorage::Init: Attempt to re-initialize with KVS config file: /tmp/chip_kvs
[1671008251.658982][3359:3359] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_factory.ini
[1671008251.659342][3359:3359] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_config.ini
[1671008251.659516][3359:3359] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_counters.ini
[1671008251.659910][3359:3359] CHIP:DL: writing settings to file (/tmp/chip_counters.ini-IabAmT)
[1671008251.660617][3359:3359] CHIP:DL: renamed tmp file to file (/tmp/chip_counters.ini)
[1671008251.660690][3359:3359] CHIP:DL: NVS set: chip-counters/reboot-count = 2 (0x2)
[1671008251.661705][3359:3359] CHIP:DL: Got Ethernet interface: eth0
[1671008251.662408][3359:3359] CHIP:DL: Found the primary Ethernet interface:eth0
[1671008251.663146][3359:3359] CHIP:DL: Got WiFi interface: wlan0
[1671008251.663231][3359:3359] CHIP:DL: Failed to reset WiFi statistic counts
[1671008251.663276][3359:3359] CHIP:SPT: *** WARNING: Using temporary passcode 20202021 due to no neither --passcode or --spake2p-verifier-base64 given on command line. This is temporary and will disappear. Please update your scripts to explicitly configure onboarding credentials. ***
[1671008251.663306][3359:3359] CHIP:SPT: *** WARNING: Using temporary test discriminator 3840 due to --discriminator not given on command line. This is temporary and will disappear. Please update your scripts to explicitly configure discriminator. ***
[1671008251.663331][3359:3359] CHIP:SPT: PASE PBKDF iterations set to 1000
[1671008251.663376][3359:3359] CHIP:SPT: LinuxCommissionableDataProvider didn't get a PASE salt, generating one.
[1671008251.671166][3359:3359] CHIP:DL: Device Configuration:
[1671008251.671235][3359:3359] CHIP:DL:   Serial Number: TEST_SN
[1671008251.671272][3359:3359] CHIP:DL:   Vendor Id: 65521 (0xFFF1)
[1671008251.671309][3359:3359] CHIP:DL:   Product Id: 32769 (0x8001)
[1671008251.671345][3359:3359] CHIP:DL:   Hardware Version: 0
[1671008251.671369][3359:3359] CHIP:DL:   Setup Pin Code (0 for UNKNOWN/ERROR): 20202021
[1671008251.671392][3359:3359] CHIP:DL:   Setup Discriminator (0xFFFF for UNKNOWN/ERROR): 3840 (0xF00)
[1671008251.671423][3359:3359] CHIP:DL:   Manufacturing Date: (not set)
[1671008251.671447][3359:3359] CHIP:DL:   Device Type: 257 (0x101)
[1671008251.671469][3359:3359] CHIP:-: ==== Onboarding payload for Standard Commissioning Flow ====
[1671008251.671509][3359:3359] CHIP:SVR: SetupQRCode: [MT:-24J042C00KA0648G00]
[1671008251.671559][3359:3359] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code:
[1671008251.671582][3359:3359] CHIP:SVR: https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J042C00KA0648G00
[1671008251.671615][3359:3359] CHIP:SVR: Manual pairing code: [34970112332]
[1671008251.671650][3359:3359] CHIP:-: ==== Onboarding payload for Custom Commissioning Flows ====
[1671008251.671705][3359:3359] CHIP:SVR: SetupQRCode: [MT:-24J0YXE00KA0648G00]
[1671008251.671745][3359:3359] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code:
[1671008251.671768][3359:3359] CHIP:SVR: https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J0YXE00KA0648G00
[1671008251.671803][3359:3359] CHIP:SVR: Manual pairing code: [749701123365521327694]
[1671008251.671880][3359:3359] CHIP:SVR: Server initializing...
[1671008251.671919][3359:3359] CHIP:FP: Initializing FabricTable from persistent storage
[1671008251.672043][3359:3359] CHIP:TS: Last Known Good Time: 2022-09-26T18:50:21
[1671008251.672107][3359:3359] CHIP:DMG: AccessControl: initializing
[1671008251.672132][3359:3359] CHIP:DMG: Examples::AccessControlDelegate::Init
[1671008251.672165][3359:3359] CHIP:DMG: AccessControl: setting
[1671008251.672190][3359:3359] CHIP:DMG: DefaultAclStorage: initializing
[1671008251.672224][3359:3359] CHIP:DMG: DefaultAclStorage: 0 entries loaded
[1671008251.672296][3359:3359] CHIP:IN: UDP::Init bind&listen port=5540
[1671008251.672463][3359:3359] CHIP:IN: UDP::Init bound to port=5540
[1671008251.672503][3359:3359] CHIP:IN: BLEBase::Init - setting/overriding transport
[1671008251.672529][3359:3359] CHIP:IN: TransportMgr initialized
[1671008251.672833][3359:3359] CHIP:DL: writing settings to file (/tmp/chip_kvs-ZtuVi6)
[1671008251.673554][3359:3359] CHIP:DL: renamed tmp file to file (/tmp/chip_kvs)
[1671008251.673709][3359:3359] CHIP:DL: writing settings to file (/tmp/chip_kvs-9BWWa8)
[1671008251.675931][3359:3359] CHIP:DL: renamed tmp file to file (/tmp/chip_kvs)
[1671008251.678476][3359:3359] CHIP:DL: writing settings to file (/tmp/chip_kvs-yA2ohf)
[1671008251.679175][3359:3359] CHIP:DL: renamed tmp file to file (/tmp/chip_kvs)
[1671008251.679241][3359:3359] CHIP:ZCL: Using ZAP configuration...
[1671008251.679355][3359:3359] CHIP:DMG: Failed to read stored attribute (0, 0x0000_0028, 0x0000_0005: ../../examples/lighting-app/linux/third_party/connectedhomeip/src/platform/Linux/KeyValueStoreManagerImpl.cpp:53: CHIP Error 0x000000A0: Value not found in the persisted storage
[1671008251.679419][3359:3359] CHIP:DMG: Failed to read stored attribute (0, 0x0000_0028, 0x0000_0010: ../../examples/lighting-app/linux/third_party/connectedhomeip/src/platform/Linux/KeyValueStoreManagerImpl.cpp:53: CHIP Error 0x000000A0: Value not found in the persisted storage
[1671008251.679495][3359:3359] CHIP:DMG: Failed to read stored attribute (0, 0x0000_002C, 0x0000_0000: ../../examples/lighting-app/linux/third_party/connectedhomeip/src/platform/Linux/KeyValueStoreManagerImpl.cpp:53: CHIP Error 0x000000A0: Value not found in the persisted storage
[1671008251.679549][3359:3359] CHIP:DMG: Failed to read stored attribute (0, 0x0000_002C, 0x0000_0001: ../../examples/lighting-app/linux/third_party/connectedhomeip/src/platform/Linux/KeyValueStoreManagerImpl.cpp:53: CHIP Error 0x000000A0: Value not found in the persisted storage
[1671008251.679621][3359:3359] CHIP:DMG: Failed to read stored attribute (1, 0x0000_0006, 0x0000_0000: ../../examples/lighting-app/linux/third_party/connectedhomeip/src/platform/Linux/KeyValueStoreManagerImpl.cpp:53: CHIP Error 0x000000A0: Value not found in the persisted storage
[1671008251.679673][3359:3359] CHIP:DMG: Failed to read stored attribute (1, 0x0000_0006, 0x0000_4003: ../../examples/lighting-app/linux/third_party/connectedhomeip/src/platform/Linux/KeyValueStoreManagerImpl.cpp:53: CHIP Error 0x000000A0: Value not found in the persisted storage
[1671008251.679743][3359:3359] CHIP:DMG: Failed to read stored attribute (1, 0x0000_0008, 0x0000_4000: ../../examples/lighting-app/linux/third_party/connectedhomeip/src/platform/Linux/KeyValueStoreManagerImpl.cpp:53: CHIP Error 0x000000A0: Value not found in the persisted storage
[1671008251.679799][3359:3359] CHIP:DMG: AccessControlCluster: initializing
[1671008251.679828][3359:3359] CHIP:DMG: Endpoint 0, Cluster 0x0000_0030 update version to a494d15
[1671008251.679887][3359:3359] CHIP:ZCL: GeneralDiagnostics: OnDeviceReboot
[1671008251.679913][3359:3359] CHIP:DMG: Endpoint 0, Cluster 0x0000_0033 update version to 27e88779
[1671008251.680027][3359:3359] CHIP:EVL: LogEvent event number: 0x0000000000010000 priority: 2, endpoint id:  0x0 cluster id: 0x0000_0033 event id: 0x3 Sys timestamp: 0x00000000007CE233
[1671008251.680059][3359:3359] CHIP:ZCL: Initiating Admin Commissioning cluster.
[1671008251.680098][3359:3359] CHIP:DMG: Endpoint 0, Cluster 0x0000_0004 update version to 351043ac
[1671008251.680122][3359:3359] CHIP:DMG: Endpoint 0, Cluster 0x0000_0004 update version to 351043ad
[1671008251.680313][3359:3359] CHIP:DL: writing settings to file (/tmp/chip_kvs-QXpGRl)
[1671008251.681244][3359:3359] CHIP:DL: renamed tmp file to file (/tmp/chip_kvs)
[1671008251.681312][3359:3359] CHIP:DMG: Endpoint 0, Cluster 0x0000_002B update version to 814580e6
[1671008251.681359][3359:3359] CHIP:DMG: Endpoint 1, Cluster 0x0000_0004 update version to 39f6f3e2
[1671008251.681386][3359:3359] CHIP:DMG: Endpoint 1, Cluster 0x0000_0004 update version to 39f6f3e3
[1671008251.681426][3359:3359] CHIP:ZCL: On/Off set value: 1 0
[1671008251.681450][3359:3359] CHIP:ZCL: On/off already set to new value
[1671008251.681736][3359:3359] CHIP:DL: writing settings to file (/tmp/chip_kvs-PqLLjY)
[1671008251.683345][3359:3359] CHIP:DL: renamed tmp file to file (/tmp/chip_kvs)
[1671008251.683456][3359:3359] CHIP:DMG: Endpoint 1, Cluster 0x0000_0008 update version to 4b854eb0
[1671008251.683509][3359:3359] CHIP:DMG: Endpoint 1, Cluster 0x0000_0300 update version to 89b4a254
[1671008251.683539][3359:3359] CHIP:DMG: Endpoint 1, Cluster 0x0000_0300 update version to 89b4a255
[1671008251.683567][3359:3359] CHIP:DMG: Endpoint 1, Cluster 0x0000_0300 update version to 89b4a256
[1671008251.683611][3359:3359] CHIP:DMG: Endpoint 1, Cluster 0x0000_0406 update version to 756ce94b
[1671008251.683639][3359:3359] CHIP:DMG: Endpoint 1, Cluster 0x0000_0406 update version to 756ce94c
[1671008251.683799][3359:3359] CHIP:IN: SecureSession[0xaaaabb72ee10]: Allocated Type:1 LSID:42237
[1671008251.683841][3359:3359] CHIP:SC: Assigned local session key ID 42237
[1671008251.683878][3359:3359] CHIP:SC: Waiting for PBKDF param request
[1671008251.683916][3359:3359] CHIP:DIS: Updating services using commissioning mode 1
[1671008251.688040][3359:3359] CHIP:DIS: CHIP minimal mDNS started advertising.
[1671008251.690627][3359:3359] CHIP:DL: Using wifi MAC for hostname
[1671008251.690752][3359:3359] CHIP:DIS: Advertise commission parameter vendorID=65521 productID=32769 discriminator=3840/15 cm=1
[1671008251.692515][3359:3359] CHIP:DIS: Responding with _matterc._udp.local
[1671008251.692555][3359:3359] CHIP:DIS: Responding with D5D182C98095B00C._matterc._udp.local
[1671008251.692581][3359:3359] CHIP:DIS: Responding with DCA63256709A0000.local
[1671008251.692606][3359:3359] CHIP:DIS: Responding with DCA63256709A0000.local
[1671008251.692638][3359:3359] CHIP:DIS: Responding with _V65521._sub._matterc._udp.local
[1671008251.692669][3359:3359] CHIP:DIS: Responding with _T257._sub._matterc._udp.local
[1671008251.692697][3359:3359] CHIP:DIS: Responding with _S15._sub._matterc._udp.local
[1671008251.692724][3359:3359] CHIP:DIS: Responding with _L3840._sub._matterc._udp.local
[1671008251.692766][3359:3359] CHIP:DIS: Responding with _CM._sub._matterc._udp.local
[1671008251.692808][3359:3359] CHIP:DIS: Responding with D5D182C98095B00C._matterc._udp.local
[1671008251.692833][3359:3359] CHIP:DIS: CHIP minimal mDNS configured as 'Commissionable node device'.
[1671008251.695809][3359:3359] CHIP:DIS: Broadcasting mDns reply for query from fe80::dea6:32ff:fe56:709a
[1671008251.698490][3359:3359] CHIP:DIS: Broadcasting mDns reply for query from fe80::42:32ff:fea1:f788
[1671008251.701141][3359:3359] CHIP:DIS: Broadcasting mDns reply for query from fd00:6d61:7474:6572::1
[1671008251.701393][3359:3359] CHIP:DIS: Broadcasting mDns reply for query from fd00:6d61:7474:6572::1
[1671008251.703951][3359:3359] CHIP:DIS: Broadcasting mDns reply for query from fe80::42:7dff:fe87:26d9
[1671008251.704160][3359:3359] CHIP:DIS: Broadcasting mDns reply for query from fe80::42:7dff:fe87:26d9
[1671008251.706734][3359:3359] CHIP:DIS: Broadcasting mDns reply for query from fe80::1
[1671008251.706958][3359:3359] CHIP:DIS: Broadcasting mDns reply for query from fe80::1
[1671008251.709254][3359:3359] CHIP:DIS: Broadcasting mDns reply for query from fe80::644f:9fff:fe17:43dd
[1671008251.711618][3359:3359] CHIP:DIS: Broadcasting mDns reply for query from fe80::40e8:9bff:fe85:7e61
[1671008251.714445][3359:3359] CHIP:DIS: Broadcasting mDns reply for query from fe80::b06c:72ff:fef3:e08e
[1671008251.716953][3359:3359] CHIP:DIS: Broadcasting mDns reply for query from fe80::8061:22ff:feda:be00
[1671008251.719398][3359:3359] CHIP:DIS: Broadcasting mDns reply for query from fe80::b8c6:3ff:fe1e:a53f
[1671008251.719614][3359:3359] CHIP:DIS: mDNS service published: _matterc._udp
[1671008251.719676][3359:3359] CHIP:DIS: Updating services using commissioning mode 1
[1671008251.724225][3359:3359] CHIP:DIS: CHIP minimal mDNS started advertising.
[1671008251.727187][3359:3359] CHIP:DIS: Broadcasting mDns reply for query from fe80::dea6:32ff:fe56:709a
[1671008251.729591][3359:3359] CHIP:DIS: Broadcasting mDns reply for query from fe80::42:32ff:fea1:f788
[1671008251.732039][3359:3359] CHIP:DIS: Broadcasting mDns reply for query from fd00:6d61:7474:6572::1
[1671008251.732372][3359:3359] CHIP:DIS: Broadcasting mDns reply for query from fd00:6d61:7474:6572::1
[1671008251.734853][3359:3359] CHIP:DIS: Broadcasting mDns reply for query from fe80::42:7dff:fe87:26d9
[1671008251.735052][3359:3359] CHIP:DIS: Broadcasting mDns reply for query from fe80::42:7dff:fe87:26d9
[1671008251.738015][3359:3359] CHIP:DIS: Broadcasting mDns reply for query from fe80::1
[1671008251.738272][3359:3359] CHIP:DIS: Broadcasting mDns reply for query from fe80::1
[1671008251.740623][3359:3359] CHIP:DIS: Broadcasting mDns reply for query from fe80::644f:9fff:fe17:43dd
[1671008251.742916][3359:3359] CHIP:DIS: Broadcasting mDns reply for query from fe80::40e8:9bff:fe85:7e61
[1671008251.745209][3359:3359] CHIP:DIS: Broadcasting mDns reply for query from fe80::b06c:72ff:fef3:e08e
[1671008251.747512][3359:3359] CHIP:DIS: Broadcasting mDns reply for query from fe80::8061:22ff:feda:be00
[1671008251.749801][3359:3359] CHIP:DIS: Broadcasting mDns reply for query from fe80::b8c6:3ff:fe1e:a53f
[1671008251.750517][3359:3359] CHIP:DL: Using wifi MAC for hostname
[1671008251.750631][3359:3359] CHIP:DIS: Advertise commission parameter vendorID=65521 productID=32769 discriminator=3840/15 cm=1
[1671008251.752071][3359:3359] CHIP:DIS: Responding with _matterc._udp.local
[1671008251.752104][3359:3359] CHIP:DIS: Responding with D5D182C98095B00C._matterc._udp.local
[1671008251.752126][3359:3359] CHIP:DIS: Responding with DCA63256709A0000.local
[1671008251.752148][3359:3359] CHIP:DIS: Responding with DCA63256709A0000.local
[1671008251.752174][3359:3359] CHIP:DIS: Responding with _V65521._sub._matterc._udp.local
[1671008251.752200][3359:3359] CHIP:DIS: Responding with _T257._sub._matterc._udp.local
[1671008251.752224][3359:3359] CHIP:DIS: Responding with _S15._sub._matterc._udp.local
[1671008251.752248][3359:3359] CHIP:DIS: Responding with _L3840._sub._matterc._udp.local
[1671008251.752748][3359:3359] CHIP:DIS: Responding with _CM._sub._matterc._udp.local
[1671008251.752788][3359:3359] CHIP:DIS: Responding with D5D182C98095B00C._matterc._udp.local
[1671008251.752809][3359:3359] CHIP:DIS: CHIP minimal mDNS configured as 'Commissionable node device'.
[1671008251.755474][3359:3359] CHIP:DIS: Broadcasting mDns reply for query from fe80::dea6:32ff:fe56:709a
[1671008251.757889][3359:3359] CHIP:DIS: Broadcasting mDns reply for query from fe80::42:32ff:fea1:f788
[1671008251.760335][3359:3359] CHIP:DIS: Broadcasting mDns reply for query from fd00:6d61:7474:6572::1
[1671008251.760580][3359:3359] CHIP:DIS: Broadcasting mDns reply for query from fd00:6d61:7474:6572::1
[1671008251.762968][3359:3359] CHIP:DIS: Broadcasting mDns reply for query from fe80::42:7dff:fe87:26d9
[1671008251.763174][3359:3359] CHIP:DIS: Broadcasting mDns reply for query from fe80::42:7dff:fe87:26d9
[1671008251.765566][3359:3359] CHIP:DIS: Broadcasting mDns reply for query from fe80::1
[1671008251.765796][3359:3359] CHIP:DIS: Broadcasting mDns reply for query from fe80::1
[1671008251.768089][3359:3359] CHIP:DIS: Broadcasting mDns reply for query from fe80::644f:9fff:fe17:43dd
[1671008251.770440][3359:3359] CHIP:DIS: Broadcasting mDns reply for query from fe80::40e8:9bff:fe85:7e61
[1671008251.773668][3359:3359] CHIP:DIS: Broadcasting mDns reply for query from fe80::b06c:72ff:fef3:e08e
[1671008251.776057][3359:3359] CHIP:DIS: Broadcasting mDns reply for query from fe80::8061:22ff:feda:be00
[1671008251.778407][3359:3359] CHIP:DIS: Broadcasting mDns reply for query from fe80::b8c6:3ff:fe1e:a53f
[1671008251.778592][3359:3359] CHIP:DIS: mDNS service published: _matterc._udp
[1671008251.778648][3359:3359] CHIP:IN: CASE Server enabling CASE session setups
[1671008251.778727][3359:3359] CHIP:IN: SecureSession[0xaaaabb7f7ac0]: Allocated Type:2 LSID:42238
[1671008251.778777][3359:3359] CHIP:SC: Allocated SecureSession (0xaaaabb7f7ac0) - waiting for Sigma1 msg
[1671008251.778806][3359:3359] CHIP:SVR: Joining Multicast groups
[1671008251.778833][3359:3359] CHIP:ZCL: Emitting StartUp event
[1671008251.778906][3359:3359] CHIP:EVL: LogEvent event number: 0x0000000000010001 priority: 2, endpoint id:  0x0 cluster id: 0x0000_0028 event id: 0x0 Sys timestamp: 0x00000000007CE296
[1671008251.778936][3359:3359] CHIP:SVR: Server Listening...
[1671008251.778965][3359:3359] CHIP:DL: Device Configuration:
[1671008251.779022][3359:3359] CHIP:DL:   Serial Number: TEST_SN
[1671008251.779077][3359:3359] CHIP:DL:   Vendor Id: 65521 (0xFFF1)
[1671008251.779112][3359:3359] CHIP:DL:   Product Id: 32769 (0x8001)
[1671008251.779155][3359:3359] CHIP:DL:   Hardware Version: 0
[1671008251.779177][3359:3359] CHIP:DL:   Setup Pin Code (0 for UNKNOWN/ERROR): 20202021
[1671008251.779206][3359:3359] CHIP:DL:   Setup Discriminator (0xFFFF for UNKNOWN/ERROR): 3840 (0xF00)
[1671008251.779234][3359:3359] CHIP:DL:   Manufacturing Date: (not set)
[1671008251.779255][3359:3359] CHIP:DL:   Device Type: 257 (0x101)
[1671008251.779299][3359:3359] CHIP:SVR: SetupQRCode: [MT:-24J0YXE00KA0648G00]
[1671008251.779326][3359:3359] CHIP:SVR: Copy/paste the below URL in a browser to see the QR Code:
[1671008251.779345][3359:3359] CHIP:SVR: https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J0YXE00KA0648G00
[1671008251.779391][3359:3359] CHIP:SVR: Manual pairing code: [749701123365521327694]
[1671008251.780764][3359:3364] CHIP:DL: TRACE: Bluez mainloop starting Thread
[1671008251.780902][3359:3362] CHIP:DL: TRACE: Bus acquired for name MATTER-3840
[1671008251.781170][3359:3362] CHIP:DL: CREATE service object at /chipoble/0d1f/service
[1671008251.781941][3359:3362] CHIP:DL: Create characteristic object at /chipoble/0d1f/service/c1
[1671008251.782498][3359:3362] CHIP:DL: Create characteristic object at /chipoble/0d1f/service/c2
[1671008251.782842][3359:3362] CHIP:DL: CHIP BTP C1 /chipoble/0d1f/service
[1671008251.782872][3359:3362] CHIP:DL: CHIP BTP C2 /chipoble/0d1f/service
[1671008251.782897][3359:3362] CHIP:DL: CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING is FALSE
[1671008251.815398][3359:3359] CHIP:DL: PlatformBlueZInit init success
[1671008251.821402][3359:3362] CHIP:DL: BluezPeripheralRegisterAppDone done
[1671008251.821786][3359:3359] CHIP:DL: HandlePlatformSpecificBLEEvent 16392
[1671008251.821868][3359:3362] CHIP:DL: Create adv object at /chipoble/0d1f/advertising
[1671008251.822311][3359:3362] CHIP:DL: SET service data to {'0xFFF6': <[byte 0x00, 0x00, 0x0f, 0xf1, 0xff, 0x01, 0x80, 0x00]>}
[1671008251.823687][3359:3359] CHIP:DL: HandlePlatformSpecificBLEEvent 16393
[1671008251.823739][3359:3359] CHIP:DL: CHIPoBLE advertising config complete
[1671008251.834162][3359:3362] CHIP:DL: RegisterAdvertisement complete
[1671008251.834494][3359:3359] CHIP:DL: HandlePlatformSpecificBLEEvent 16394
[1671008257.766338][3359:3362] CHIP:DL: Device 4B:50:01:11:8C:5D (Path: /org/bluez/hci0/dev_4B_50_01_11_8C_5D) Connected
[1671008258.866166][3359:3362] CHIP:DL: Bluez disconnected
[1671008258.866251][3359:3362] CHIP:DL: Bluez notify CHIPoBluez connection disconnected

@robinmo
Copy link
Contributor Author

robinmo commented Dec 14, 2022

Xcode log:

2022-12-14 17:28:05.877141+0800 CHIPTool[690:65352] [SceneConfiguration] Info.plist contained no UIScene configuration dictionary (looking for configuration named "(no name)")
2022-12-14 17:28:05.877191+0800 CHIPTool[690:65352] [SceneConfiguration] Info.plist contained no UIScene configuration dictionary (looking for configuration named "(no name)")
2022-12-14 17:28:12.237190+0800 CHIPTool[690:65352] [DataManagement] AccessControl: initializing
2022-12-14 17:28:12.238315+0800 CHIPTool[690:65352] [DeviceLayer] _Init
2022-12-14 17:28:12.238417+0800 CHIPTool[690:65352] [Inet] UDP::Init bind&listen port=0
2022-12-14 17:28:12.238580+0800 CHIPTool[690:65352] [Inet] UDP::Init bound to port=55748
2022-12-14 17:28:12.238593+0800 CHIPTool[690:65352] [Inet] UDP::Init bind&listen port=0
2022-12-14 17:28:12.238645+0800 CHIPTool[690:65352] [Inet] UDP::Init bound to port=63888
2022-12-14 17:28:12.238685+0800 CHIPTool[690:65352] [Inet] BLEBase::Init - setting/overriding transport
2022-12-14 17:28:12.238695+0800 CHIPTool[690:65352] [Inet] TransportMgr initialized
2022-12-14 17:28:12.238774+0800 CHIPTool[690:65352] [FabricProvisioning] Initializing FabricTable from persistent storage
2022-12-14 17:28:12.238962+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: g/lkgt, value {length = 8, bytes = 0x1526002caa2c2b18}
2022-12-14 17:28:12.239278+0800 CHIPTool[690:65352] [TimeService] Last Known Good Time: 2022-12-14T15:37:16
2022-12-14 17:28:12.239394+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: g/fidx, value {length = 10, bytes = 0x15240002360104011818}
2022-12-14 17:28:12.239506+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: f/1/n, value {length = 265, bytes = 0x15300101 01240201 37032413 0b2715e3 ... b1d58e2f 4ac9d818 }
2022-12-14 17:28:12.239604+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: f/1/r, value {length = 251, bytes = 0x15300101 00240201 37032414 0b2715e3 ... 209eefbb 1f9a3418 }
2022-12-14 17:28:12.240388+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: f/1/m, value {length = 9, bytes = 0x152500f1ff2c010018}
2022-12-14 17:28:12.240515+0800 CHIPTool[690:65352] [FabricProvisioning] Fabric index 0x1 was retrieved from storage. Compressed FabricId 0x90DCE2B562E1D172, FabricId 0x0000000CEF5E80E3, NodeId 0x0000001D3485C4AC, VendorId 0xFFF1
2022-12-14 17:28:12.240575+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: g/fs/c, value (null)
2022-12-14 17:28:12.240928+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: g/gcc, value {length = 4, bytes = 0x80bb0000}
2022-12-14 17:28:12.240993+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: g/gdc, value {length = 4, bytes = 0x80bb0000}
2022-12-14 17:28:12.242696+0800 CHIPTool[690:65352] [Controller] System State Initialized...
2022-12-14 17:28:12.242742+0800 CHIPTool[690:65352] [Controller] Shutting down the System State, this will teardown the CHIP Stack
2022-12-14 17:28:12.242868+0800 CHIPTool[690:65352] [DataManagement] IM WH moving to [Uninitialized]
2022-12-14 17:28:12.242879+0800 CHIPTool[690:65352] [DataManagement] IM WH moving to [Uninitialized]
2022-12-14 17:28:12.242885+0800 CHIPTool[690:65352] [DataManagement] IM WH moving to [Uninitialized]
2022-12-14 17:28:12.242891+0800 CHIPTool[690:65352] [DataManagement] IM WH moving to [Uninitialized]
2022-12-14 17:28:12.242954+0800 CHIPTool[690:65352] [DataManagement] All ReadHandler-s are clean, clear GlobalDirtySet
2022-12-14 17:28:12.243043+0800 CHIPTool[690:65352] [Ble] CancelConnection
2022-12-14 17:28:12.243112+0800 CHIPTool[690:65352] [FabricProvisioning] Shutting down FabricTable
2022-12-14 17:28:12.243155+0800 CHIPTool[690:65352] [TimeService] Pending Last Known Good Time: 2022-12-14T15:37:16
2022-12-14 17:28:12.243264+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: g/lkgt, value {length = 8, bytes = 0x1526002caa2c2b18}
2022-12-14 17:28:12.243296+0800 CHIPTool[690:65352] [TimeService] Previous Last Known Good Time: 2022-12-14T15:37:16
2022-12-14 17:28:12.243316+0800 CHIPTool[690:65352] [TimeService] Reverted Last Known Good Time to previous value
2022-12-14 17:28:12.243335+0800 CHIPTool[690:65352] [DeviceLayer] Inet Layer shutdown
2022-12-14 17:28:12.243352+0800 CHIPTool[690:65352] [DeviceLayer] BLE shutdown
2022-12-14 17:28:12.243368+0800 CHIPTool[690:65352] [DeviceLayer] System Layer shutdown
2022-12-14 17:28:12.243488+0800 CHIPTool[690:65362] [DeviceLayer] _OnPlatformEvent
2022-12-14 17:28:12.253487+0800 CHIPTool[690:65352] Found an existing IPK in the keychain
2022-12-14 17:28:12.254436+0800 CHIPTool[690:65352] Found an existing CA key in the keychain
2022-12-14 17:28:12.254657+0800 CHIPTool[690:65352] [Default] Generating root certificate
2022-12-14 17:28:12.255756+0800 CHIPTool[690:65352] [Default] Generating intermediate certificate
2022-12-14 17:28:12.258097+0800 CHIPTool[690:65352] [Default] Generating operational certificate
2022-12-14 17:28:12.259637+0800 CHIPTool[690:65352] Matter step====_nocSigner = operationalKeypair;
2022-12-14 17:28:12.259748+0800 CHIPTool[690:65352] [FabricProvisioning] Initializing FabricTable from persistent storage
2022-12-14 17:28:12.259808+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: g/lkgt, value {length = 8, bytes = 0x1526002caa2c2b18}
2022-12-14 17:28:12.259854+0800 CHIPTool[690:65352] [TimeService] Last Known Good Time: 2022-12-14T15:37:16
2022-12-14 17:28:12.259905+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: g/fidx, value {length = 10, bytes = 0x15240002360104011818}
2022-12-14 17:28:12.259957+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: f/1/n, value {length = 265, bytes = 0x15300101 01240201 37032413 0b2715e3 ... b1d58e2f 4ac9d818 }
2022-12-14 17:28:12.260005+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: f/1/r, value {length = 251, bytes = 0x15300101 00240201 37032414 0b2715e3 ... 209eefbb 1f9a3418 }
2022-12-14 17:28:12.260128+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: f/1/m, value {length = 9, bytes = 0x152500f1ff2c010018}
2022-12-14 17:28:12.260157+0800 CHIPTool[690:65352] [FabricProvisioning] Fabric index 0x1 was retrieved from storage. Compressed FabricId 0x90DCE2B562E1D172, FabricId 0x0000000CEF5E80E3, NodeId 0x0000001D3485C4AC, VendorId 0xFFF1
2022-12-14 17:28:12.260204+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: g/fs/c, value (null)
2022-12-14 17:28:12.262006+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: f/1/i, value {length = 251, bytes = 0x15300101 00240201 37032414 0b2715e3 ... 96985268 0a850918 }
2022-12-14 17:28:12.262089+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: f/1/r, value {length = 251, bytes = 0x15300101 00240201 37032414 0b2715e3 ... 209eefbb 1f9a3418 }
2022-12-14 17:28:12.265785+0800 CHIPTool[690:65352] [Controller] Stopping commissioning discovery over DNS-SD
2022-12-14 17:28:12.265931+0800 CHIPTool[690:65352] [Controller] Setting attestation nonce to random value
2022-12-14 17:28:12.266060+0800 CHIPTool[690:65352] [Controller] Setting CSR nonce to random value
2022-12-14 17:28:12.266306+0800 CHIPTool[690:65352] [DeviceLayer] _Init
2022-12-14 17:28:12.266318+0800 CHIPTool[690:65352] [Inet] UDP::Init bind&listen port=0
2022-12-14 17:28:12.266404+0800 CHIPTool[690:65352] [Inet] UDP::Init bound to port=63524
2022-12-14 17:28:12.266411+0800 CHIPTool[690:65352] [Inet] UDP::Init bind&listen port=0
2022-12-14 17:28:12.266451+0800 CHIPTool[690:65352] [Inet] UDP::Init bound to port=60996
2022-12-14 17:28:12.266457+0800 CHIPTool[690:65352] [Inet] BLEBase::Init - setting/overriding transport
2022-12-14 17:28:12.266462+0800 CHIPTool[690:65352] [Inet] TransportMgr initialized
2022-12-14 17:28:12.266471+0800 CHIPTool[690:65352] [FabricProvisioning] Initializing FabricTable from persistent storage
2022-12-14 17:28:12.266501+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: g/lkgt, value {length = 8, bytes = 0x1526002caa2c2b18}
2022-12-14 17:28:12.266534+0800 CHIPTool[690:65352] [TimeService] Last Known Good Time: 2022-12-14T15:37:16
2022-12-14 17:28:12.266583+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: g/fidx, value {length = 10, bytes = 0x15240002360104011818}
2022-12-14 17:28:12.266628+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: f/1/n, value {length = 265, bytes = 0x15300101 01240201 37032413 0b2715e3 ... b1d58e2f 4ac9d818 }
2022-12-14 17:28:12.266672+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: f/1/r, value {length = 251, bytes = 0x15300101 00240201 37032414 0b2715e3 ... 209eefbb 1f9a3418 }
2022-12-14 17:28:12.266783+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: f/1/m, value {length = 9, bytes = 0x152500f1ff2c010018}
2022-12-14 17:28:12.266812+0800 CHIPTool[690:65352] [FabricProvisioning] Fabric index 0x1 was retrieved from storage. Compressed FabricId 0x90DCE2B562E1D172, FabricId 0x0000000CEF5E80E3, NodeId 0x0000001D3485C4AC, VendorId 0xFFF1
2022-12-14 17:28:12.266852+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: g/fs/c, value (null)
2022-12-14 17:28:12.267102+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: g/gcc, value {length = 4, bytes = 0x68bf0000}
2022-12-14 17:28:12.267154+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: g/gdc, value {length = 4, bytes = 0x68bf0000}
2022-12-14 17:28:12.267970+0800 CHIPTool[690:65352] [Controller] System State Initialized...
2022-12-14 17:28:12.268222+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: f/1/r, value {length = 251, bytes = 0x15300101 00240201 37032414 0b2715e3 ... 209eefbb 1f9a3418 }
2022-12-14 17:28:12.268329+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: f/1/r, value {length = 251, bytes = 0x15300101 00240201 37032414 0b2715e3 ... 209eefbb 1f9a3418 }
2022-12-14 17:28:12.268380+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: f/1/n, value {length = 265, bytes = 0x15300101 01240201 37032413 0b2715e3 ... b1d58e2f 4ac9d818 }
2022-12-14 17:28:12.268473+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: f/1/r, value {length = 251, bytes = 0x15300101 00240201 37032414 0b2715e3 ... 209eefbb 1f9a3418 }
2022-12-14 17:28:12.268501+0800 CHIPTool[690:65352] [FabricProvisioning] Validating NOC chain
2022-12-14 17:28:12.276770+0800 CHIPTool[690:65352] [FabricProvisioning] NOC chain validation successful
2022-12-14 17:28:12.276793+0800 CHIPTool[690:65352] [FabricProvisioning] Updated fabric at index: 0x1, Node ID: 0x0000001D3485C4AC
2022-12-14 17:28:12.276815+0800 CHIPTool[690:65352] [TimeService] Last Known Good Time: 2022-12-14T15:37:16
2022-12-14 17:28:12.276836+0800 CHIPTool[690:65352] [TimeService] New proposed Last Known Good Time: 2022-12-14T09:28:12
2022-12-14 17:28:12.276854+0800 CHIPTool[690:65352] [TimeService] Retaining current Last Known Good Time
2022-12-14 17:28:12.276898+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: g/sri, value (null)
2022-12-14 17:28:12.277133+0800 CHIPTool[690:65352] [FabricProvisioning] Metadata for Fabric 0x1 persisted to storage.
2022-12-14 17:28:12.277204+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: f/1/o, value (null)
2022-12-14 17:28:12.277594+0800 CHIPTool[690:65352] [TimeService] Committing Last Known Good Time to storage: 2022-12-14T15:37:16
2022-12-14 17:28:12.277858+0800 CHIPTool[690:65352] [Controller] Joined the fabric at index 1. Fabric ID is 0x0000000CEF5E80E3 (Compressed Fabric ID: 90DCE2B562E1D172)
2022-12-14 17:28:12.278007+0800 CHIPTool[690:65362] [DeviceLayer] _OnPlatformEvent
Thread Performance Checker: -[AVCaptureSession startRunning] should be called from background thread. Calling it on the main thread can lead to UI unresponsiveness
PID: 690, TID: 65352
Backtrace
=================================================================
3   CHIPTool                            0x000000010024cfc8 -[QRCodeViewController startScanning] + 884
4   CHIPTool                            0x000000010024d8a4 -[QRCodeViewController startScanningQRCode:] + 76
5   UIKitCore                           0x0000000190407908 59CBC9B5-30AE-396E-A269-A986640001BC + 2418952
6   UIKitCore                           0x00000001907d9620 59CBC9B5-30AE-396E-A269-A986640001BC + 6424096
7   UIKitCore                           0x00000001907c4258 59CBC9B5-30AE-396E-A269-A986640001BC + 6337112
8   UIKitCore                           0x00000001907c4158 59CBC9B5-30AE-396E-A269-A986640001BC + 6336856
9   UIKitCore                           0x0000000190407908 59CBC9B5-30AE-396E-A269-A986640001BC + 2418952
10  UIKitCore                           0x0000000190407608 59CBC9B5-30AE-396E-A269-A986640001BC + 2418184
11  UIKitCore                           0x0000000190406f9c 59CBC9B5-30AE-396E-A269-A986640001BC + 2416540
12  UIKitCore                           0x0000000190406fd8 59CBC9B5-30AE-396E-A269-A986640001BC + 2416600
13  UIKitCore                           0x0000000190406a14 59CBC9B5-30AE-396E-A269-A986640001BC + 2415124
14  UIKitCore                           0x00000001902ec268 59CBC9B5-30AE-396E-A269-A986640001BC + 1258088
15  CoreFoundation                      0x000000018e075d40 725E49F4-653B-39BF-9A7A-8A3250911ECB + 597312
16  CoreFoundation                      0x000000018dffe290 725E49F4-653B-39BF-9A7A-8A3250911ECB + 107152
17  CoreFoundation                      0x000000018e05fc60 725E49F4-653B-39BF-9A7A-8A3250911ECB + 506976
18  CoreFoundation                      0x000000018e064ec0 CFRunLoopRunSpecific + 612
19  GraphicsServices                    0x00000001c80bb368 GSEventRunModal + 164
20  UIKitCore                           0x000000019055a86c 59CBC9B5-30AE-396E-A269-A986640001BC + 3807340
21  UIKitCore                           0x000000019055a4d0 UIApplicationMain + 340
22  CHIPTool                            0x000000010025e3a4 main + 124
23  dyld                                0x00000001ac886960 7B63C573-6161-3B33-A3A2-9944BA59722F + 88416
2022-12-14 17:28:22.378201+0800 CHIPTool[690:65352] Payload vendorID 65521
2022-12-14 17:28:22.378406+0800 CHIPTool[690:65352] Rendezvous Default
2022-12-14 17:28:22.386664+0800 CHIPTool[690:65352] Found an existing IPK in the keychain
2022-12-14 17:28:22.388188+0800 CHIPTool[690:65352] Found an existing CA key in the keychain
2022-12-14 17:28:22.388343+0800 CHIPTool[690:65352] Shutting down the stack
2022-12-14 17:28:22.388536+0800 CHIPTool[690:65352] [Controller] Shutting down the commissioner
2022-12-14 17:28:22.388558+0800 CHIPTool[690:65352] [Controller] Stopping commissioning discovery over DNS-SD
2022-12-14 17:28:22.388574+0800 CHIPTool[690:65352] [Controller] Shutting down the controller
2022-12-14 17:28:22.388590+0800 CHIPTool[690:65352] [Inet] Expiring all sessions for fabric 0x1!!
2022-12-14 17:28:22.388605+0800 CHIPTool[690:65352] [FabricProvisioning] Forgetting fabric 0x1
2022-12-14 17:28:22.388742+0800 CHIPTool[690:65352] [TimeService] Pending Last Known Good Time: 2022-12-14T15:37:16
2022-12-14 17:28:22.388903+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: g/lkgt, value {length = 8, bytes = 0x1526002caa2c2b18}
2022-12-14 17:28:22.388997+0800 CHIPTool[690:65352] [TimeService] Previous Last Known Good Time: 2022-12-14T15:37:16
2022-12-14 17:28:22.389060+0800 CHIPTool[690:65352] [TimeService] Reverted Last Known Good Time to previous value
2022-12-14 17:28:22.389117+0800 CHIPTool[690:65352] [Controller] Shutting down the System State, this will teardown the CHIP Stack
2022-12-14 17:28:22.389147+0800 CHIPTool[690:65352] [DataManagement] IM WH moving to [Uninitialized]
2022-12-14 17:28:22.389160+0800 CHIPTool[690:65352] [DataManagement] IM WH moving to [Uninitialized]
2022-12-14 17:28:22.389172+0800 CHIPTool[690:65352] [DataManagement] IM WH moving to [Uninitialized]
2022-12-14 17:28:22.389183+0800 CHIPTool[690:65352] [DataManagement] IM WH moving to [Uninitialized]
2022-12-14 17:28:22.389197+0800 CHIPTool[690:65352] [DataManagement] All ReadHandler-s are clean, clear GlobalDirtySet
2022-12-14 17:28:22.389351+0800 CHIPTool[690:65352] [Ble] CancelConnection
2022-12-14 17:28:22.389428+0800 CHIPTool[690:65352] [FabricProvisioning] Shutting down FabricTable
2022-12-14 17:28:22.389500+0800 CHIPTool[690:65352] [TimeService] Pending Last Known Good Time: 2022-12-14T15:37:16
2022-12-14 17:28:22.389632+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: g/lkgt, value {length = 8, bytes = 0x1526002caa2c2b18}
2022-12-14 17:28:22.389723+0800 CHIPTool[690:65352] [TimeService] Previous Last Known Good Time: 2022-12-14T15:37:16
2022-12-14 17:28:22.389786+0800 CHIPTool[690:65352] [TimeService] Reverted Last Known Good Time to previous value
2022-12-14 17:28:22.389841+0800 CHIPTool[690:65352] [DeviceLayer] Inet Layer shutdown
2022-12-14 17:28:22.389893+0800 CHIPTool[690:65352] [DeviceLayer] BLE shutdown
2022-12-14 17:28:22.389949+0800 CHIPTool[690:65352] [DeviceLayer] System Layer shutdown
2022-12-14 17:28:22.390077+0800 CHIPTool[690:65352] Starting up the stack
2022-12-14 17:28:22.390669+0800 CHIPTool[690:65352] [Default] Generating root certificate
2022-12-14 17:28:22.391833+0800 CHIPTool[690:65352] [Default] Generating intermediate certificate
2022-12-14 17:28:22.394952+0800 CHIPTool[690:65352] [Default] Generating operational certificate
2022-12-14 17:28:22.398093+0800 CHIPTool[690:65352] Matter step====_nocSigner = operationalKeypair;
2022-12-14 17:28:22.398247+0800 CHIPTool[690:65352] [FabricProvisioning] Initializing FabricTable from persistent storage
2022-12-14 17:28:22.398328+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: g/lkgt, value {length = 8, bytes = 0x1526002caa2c2b18}
2022-12-14 17:28:22.398398+0800 CHIPTool[690:65352] [TimeService] Last Known Good Time: 2022-12-14T15:37:16
2022-12-14 17:28:22.398477+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: g/fidx, value {length = 10, bytes = 0x15240002360104011818}
2022-12-14 17:28:22.398568+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: f/1/n, value {length = 265, bytes = 0x15300101 01240201 37032413 0b2715e3 ... f72c3811 102d8f18 }
2022-12-14 17:28:22.398646+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: f/1/r, value {length = 251, bytes = 0x15300101 00240201 37032414 0b2715e3 ... 209eefbb 1f9a3418 }
2022-12-14 17:28:22.398862+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: f/1/m, value {length = 9, bytes = 0x152500f1ff2c010018}
2022-12-14 17:28:22.398910+0800 CHIPTool[690:65352] [FabricProvisioning] Fabric index 0x1 was retrieved from storage. Compressed FabricId 0x90DCE2B562E1D172, FabricId 0x0000000CEF5E80E3, NodeId 0x0000001D3485C4AC, VendorId 0xFFF1
2022-12-14 17:28:22.398985+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: g/fs/c, value (null)
2022-12-14 17:28:22.402495+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: f/1/i, value {length = 251, bytes = 0x15300101 00240201 37032414 0b2715e3 ... ae44a37c 74906618 }
2022-12-14 17:28:22.402689+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: f/1/r, value {length = 251, bytes = 0x15300101 00240201 37032414 0b2715e3 ... 209eefbb 1f9a3418 }
2022-12-14 17:28:22.407740+0800 CHIPTool[690:65352] [Controller] Stopping commissioning discovery over DNS-SD
2022-12-14 17:28:22.407787+0800 CHIPTool[690:65352] [Controller] Setting attestation nonce to random value
2022-12-14 17:28:22.408002+0800 CHIPTool[690:65352] [Controller] Setting CSR nonce to random value
2022-12-14 17:28:22.408363+0800 CHIPTool[690:65352] [DeviceLayer] _Init
2022-12-14 17:28:22.408386+0800 CHIPTool[690:65352] [Inet] UDP::Init bind&listen port=0
2022-12-14 17:28:22.408485+0800 CHIPTool[690:65352] [Inet] UDP::Init bound to port=60230
2022-12-14 17:28:22.408496+0800 CHIPTool[690:65352] [Inet] UDP::Init bind&listen port=0
2022-12-14 17:28:22.408542+0800 CHIPTool[690:65352] [Inet] UDP::Init bound to port=58070
2022-12-14 17:28:22.408551+0800 CHIPTool[690:65352] [Inet] BLEBase::Init - setting/overriding transport
2022-12-14 17:28:22.408557+0800 CHIPTool[690:65352] [Inet] TransportMgr initialized
2022-12-14 17:28:22.408571+0800 CHIPTool[690:65352] [FabricProvisioning] Initializing FabricTable from persistent storage
2022-12-14 17:28:22.408643+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: g/lkgt, value {length = 8, bytes = 0x1526002caa2c2b18}
2022-12-14 17:28:22.408714+0800 CHIPTool[690:65352] [TimeService] Last Known Good Time: 2022-12-14T15:37:16
2022-12-14 17:28:22.408790+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: g/fidx, value {length = 10, bytes = 0x15240002360104011818}
2022-12-14 17:28:22.408869+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: f/1/n, value {length = 265, bytes = 0x15300101 01240201 37032413 0b2715e3 ... f72c3811 102d8f18 }
2022-12-14 17:28:22.408938+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: f/1/r, value {length = 251, bytes = 0x15300101 00240201 37032414 0b2715e3 ... 209eefbb 1f9a3418 }
2022-12-14 17:28:22.409121+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: f/1/m, value {length = 9, bytes = 0x152500f1ff2c010018}
2022-12-14 17:28:22.409164+0800 CHIPTool[690:65352] [FabricProvisioning] Fabric index 0x1 was retrieved from storage. Compressed FabricId 0x90DCE2B562E1D172, FabricId 0x0000000CEF5E80E3, NodeId 0x0000001D3485C4AC, VendorId 0xFFF1
2022-12-14 17:28:22.409221+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: g/fs/c, value (null)
2022-12-14 17:28:22.409547+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: g/gcc, value {length = 4, bytes = 0x50c30000}
2022-12-14 17:28:22.409614+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: g/gdc, value {length = 4, bytes = 0x50c30000}
2022-12-14 17:28:22.410997+0800 CHIPTool[690:65352] [Controller] System State Initialized...
2022-12-14 17:28:22.411344+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: f/1/r, value {length = 251, bytes = 0x15300101 00240201 37032414 0b2715e3 ... 209eefbb 1f9a3418 }
2022-12-14 17:28:22.411469+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: f/1/r, value {length = 251, bytes = 0x15300101 00240201 37032414 0b2715e3 ... 209eefbb 1f9a3418 }
2022-12-14 17:28:22.411543+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: f/1/n, value {length = 265, bytes = 0x15300101 01240201 37032413 0b2715e3 ... f72c3811 102d8f18 }
2022-12-14 17:28:22.411615+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: f/1/r, value {length = 251, bytes = 0x15300101 00240201 37032414 0b2715e3 ... 209eefbb 1f9a3418 }
2022-12-14 17:28:22.411653+0800 CHIPTool[690:65352] [FabricProvisioning] Validating NOC chain
2022-12-14 17:28:22.422771+0800 CHIPTool[690:65352] [FabricProvisioning] NOC chain validation successful
2022-12-14 17:28:22.422804+0800 CHIPTool[690:65352] [FabricProvisioning] Updated fabric at index: 0x1, Node ID: 0x0000001D3485C4AC
2022-12-14 17:28:22.422837+0800 CHIPTool[690:65352] [TimeService] Last Known Good Time: 2022-12-14T15:37:16
2022-12-14 17:28:22.422867+0800 CHIPTool[690:65352] [TimeService] New proposed Last Known Good Time: 2022-12-14T09:28:22
2022-12-14 17:28:22.422889+0800 CHIPTool[690:65352] [TimeService] Retaining current Last Known Good Time
2022-12-14 17:28:22.422927+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: g/sri, value (null)
2022-12-14 17:28:22.423222+0800 CHIPTool[690:65352] [FabricProvisioning] Metadata for Fabric 0x1 persisted to storage.
2022-12-14 17:28:22.423295+0800 CHIPTool[690:65352] MTRPersistentStorageDelegate Get Value for Key: f/1/o, value (null)
2022-12-14 17:28:22.423836+0800 CHIPTool[690:65352] [TimeService] Committing Last Known Good Time to storage: 2022-12-14T15:37:16
2022-12-14 17:28:22.424141+0800 CHIPTool[690:65352] [Controller] Joined the fabric at index 1. Fabric ID is 0x0000000CEF5E80E3 (Compressed Fabric ID: 90DCE2B562E1D172)
2022-12-14 17:28:22.424409+0800 CHIPTool[690:65364] [DeviceLayer] _OnPlatformEvent
2022-12-14 17:28:22.424462+0800 CHIPTool[690:65352] [Controller] Stopping commissioning discovery over DNS-SD
2022-12-14 17:28:22.424470+0800 CHIPTool[690:65352] [Controller] Starting commissioning discovery over BLE
2022-12-14 17:28:22.424501+0800 CHIPTool[690:65352] [Ble] NewConnection
2022-12-14 17:28:22.424524+0800 CHIPTool[690:65352] [Ble] CancelConnection
2022-12-14 17:28:22.425396+0800 CHIPTool[690:65352] [Controller] Starting commissioning discovery over DNS-SD
2022-12-14 17:28:22.425504+0800 CHIPTool[690:65352] [Discovery] Browsing for: _matterc._udp,_L3840
2022-12-14 17:28:22.433741+0800 CHIPTool[690:65364] [Ble] CBManagerState: ON
2022-12-14 17:28:22.846168+0800 CHIPTool[690:65364] [Ble] Connecting to device with discriminator: 3840
2022-12-14 17:28:27.509638+0800 CHIPTool[690:65364] [Controller] Discovered device to be commissioned over BLE
2022-12-14 17:28:27.509919+0800 CHIPTool[690:65364] [Controller] Attempting PASE connection to BLE
2022-12-14 17:28:27.510065+0800 CHIPTool[690:65364] [Inet] BleConnectionComplete: endPoint 0x10b305760
2022-12-14 17:28:27.510263+0800 CHIPTool[690:65364] [Ble] ATT MTU = 517
2022-12-14 17:28:27.511372+0800 CHIPTool[690:65368] [Ble] BLE:Error writing Characteristics in Chip service on the device: [The specified UUID is not allowed for this operation.]
2022-12-14 17:28:27.512000+0800 CHIPTool[690:65364] [Inet] SecureSession[0x282038000]: Allocated Type:1 LSID:55061
2022-12-14 17:28:27.512147+0800 CHIPTool[690:65364] [SecureChannel] Assigned local session key ID 55061
2022-12-14 17:28:27.512837+0800 CHIPTool[690:65364] [ExchangeManager] <<< [E:855i M:61762015] (U) Msg TX to 0:0000000000000000 [0000] --- Type 0000:20 (SecureChannel:PBKDFParamRequest)
2022-12-14 17:28:27.513071+0800 CHIPTool[690:65364] [Inet] (U) Sending msg 61762015 to IP address 'BLE'
2022-12-14 17:28:27.513186+0800 CHIPTool[690:65364] [Inet] Message appended to BLE send queue
2022-12-14 17:28:27.513211+0800 CHIPTool[690:65364] [SecureChannel] Sent PBKDF param request
2022-12-14 17:28:27.513370+0800 CHIPTool[690:65364] [Inet] Failed to establish BLE connection: ../../../../../../../../../../../connectedhomeip/src/platform/Darwin/BleConnectionDelegateImpl.mm:260: Ble Error 0x00000407: GATT write characteristic operation failed
2022-12-14 17:28:27.513490+0800 CHIPTool[690:65364] [Inet] Clearing BLE pending packets.
2022-12-14 17:28:27.513513+0800 CHIPTool[690:65364] [Ble] Auto-closing end point's BLE connection.

@robinmo
Copy link
Contributor Author

robinmo commented Dec 14, 2022

I found it show:

[Ble] BLE:Error writing Characteristics in Chip service on the device: [The specified UUID is not allowed for this operation.]

but if I use iPhone SE iOS16.0, it runs well, and pair success with buletooth.

@bzbarsky-apple
Copy link
Contributor

@robinmo Please see documentation at https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/darwin.md and in particular you need to enable developer mode on your phone and follow the steps https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/darwin.md#profile-installation for this to work.

@robinmo
Copy link
Contributor Author

robinmo commented Dec 15, 2022

@bzbarsky-apple thanks. This error dismiss, after I installed the Bluetooth Central Matter Client Developer mode profile.

However, how can I help the app user install this profile if I distribute a matter app? Is it needed for app distributed through Apple App store?

@bzbarsky-apple
Copy link
Contributor

However, how can I help the app user install this profile if I distribute a matter app?

If you're distributing a Matter app through the app store, it needs to be using the MatterSupport framework. See https://developer.apple.com/documentation/mattersupport

@robinmo
Copy link
Contributor Author

robinmo commented Jan 3, 2023

However, how can I help the app user install this profile if I distribute a matter app?

If you're distributing a Matter app through the app store, it needs to be using the MatterSupport framework. See https://developer.apple.com/documentation/mattersupport

Hi, @bzbarsky-apple mattersupport is unavailable until 16.1, so if I try to use matter in lower versions of iOS(such as 15.3), how can I fulfill it?

@bzbarsky-apple
Copy link
Contributor

@robinmo Matter.framework is not available there either, so if you are targeting those versions presumably you are shipping your own version of the whole Matter stack. On versions before MatterSupport is available, you would use that; on versions where MatterSupport is available you use MatterSupport.

@robinmo
Copy link
Contributor Author

robinmo commented Jan 4, 2023

@bzbarsky-apple Thanks. So, go back to the Bluetooth Central Matter Client Developer mode profile, how can I help the app (download from App Store) user install it.

@bzbarsky-apple
Copy link
Contributor

@robinmo You can't. But that profile is also not needed on iOS versions where MatterSupport does not exist.

@robinmo
Copy link
Contributor Author

robinmo commented Feb 2, 2023

@robinmo You can't. But that profile is also not needed on iOS versions where MatterSupport does not exist.

Hi, @bzbarsky-apple I upload a app version with this repo whole matter stack, while without Bluetooth Central Matter Client Developer mode profile commission will fail, and after installing the ble profile it turns out success. So, the profile is needed for iOS versions where MatterSupport does not exist? Then should I deal with installing the profile through my app?

@bzbarsky-apple
Copy link
Contributor

So, the profile is needed for iOS versions where MatterSupport does not exist?

Again, no. The profile is only needed in 16.1 or newer, where MatterSupport exists.

So for things before 16.1 you can use your own Matter.framework (which you are presumably shipping, since that also does not exist before 16.1) and commission over BLE. Starting with 16.1 you need to use MatterSupport. If you want to support both, that needs to be a runtime decision.

Then should I deal with installing the profile through my app?

Normal users should not be installing this profile, period. For one thing, the profile only works if you enable Developer Mode on your device, and normal users should not be doing that.

@robinmo
Copy link
Contributor Author

robinmo commented Mar 15, 2023

Hi,@bzbarsky-apple

Is there a way to support matter from iOS11.0?

In the CHIP Tool iOS Sample Commissioner App readme doc says:

Requires building and running the app to a physical device on iOS >= 15.4.

Does it mean that the sample app matter framework cannot support iOS < 15.4?
I have just changed the sample project configuration mini deployment version to iOS 11.0,

image

built and ran, soon the app crashed
iShot_2023-03-15_16 22 53

Found MatterSupport.h is still empty, use Matter.h instead?

Starting with 16.1 you need to use MatterSupport.

In Xcode 14.2 iOS16.2 Framework MatterSupport.h is empty,
should I use Matter.h instead?
iShot_2023-03-15_19 37 28

@bzbarsky-apple
Copy link
Contributor

@robinmo I am pretty sure no one has tested Matter.framework on anything before iOS 13.

MatterSupport.framework does not exist before 15.x.

@robinmo
Copy link
Contributor Author

robinmo commented Mar 16, 2023

@robinmo I am pretty sure no one has tested Matter.framework on anything before iOS 13.

@balducci-apple Many thanks.
Got it.

Xcode14.3Beta MatterSupport.h
However, I found that MatterSupport.h still contains nothing but Foundation in Xcode 14.3 beta.
should I use Matter.h instead?

@bzbarsky-apple
Copy link
Contributor

bzbarsky-apple commented Mar 16, 2023

@robinmo My understanding is that MatterSupport is a Swift-only API.

And just to be clear, you would use MatterSupport.framework to generate a setup code and then Matter.framework to commission using that setup code and interact with the device.

@robinmo
Copy link
Contributor Author

robinmo commented Mar 21, 2023

@bzbarsky-apple

And just to be clear, you would use MatterSupport.framework to generate a setup code and then Matter.framework to commission using that setup code and interact with the device.

Generate a setup code? You mean pairing code or a QR code payload?
I run the sample code as doc https://developer.apple.com/documentation/mattersupport?changes=latest_minor

import MatterSupport

let request = MatterAddDeviceRequest(
    topology: .init(ecosystemName: "Acme SmartHome", homes: [
        .init(displayName: "Default Acme Home"),
    ])
)

do {
    try await request.perform()
    print("Successfully set up a device!")
} catch {
    print("Failed to set up a device with error: \(error)")
}

it runs but stuck in the scene below, never get the callback.
iShot_2023-03-21_20 26 38

Another issue about MatterSupport, when integrated with objective-c the bridge file(eg xx-Swift.h) turn out to show error:
Cannot find interface declaration for 'MatterAddDeviceExtensionRequestHandler', superclass of 'MatterAddDeviceHandler'
iShot_2023-03-21_20 29 11

Xcode Version 14.2 (14C18)
My code:

//
//  MatterHelper.swift
//  xx
//
//  Created by Robin on 2023/3/21.
//

import Foundation
import MatterSupport

@available(iOS 16.1, *)
class MatterHelper: NSObject
{
    @objc class func commission()
    {
        let request = MatterAddDeviceRequest(
            topology: .init(ecosystemName: "RRRRRR", homes: [
                .init(displayName: "R11111"), .init(displayName: "R222222")
            ])
        )
        Task.init
        {
            do
            {
                try await request.perform()
                print("Successfully set up a device!")
            }
            catch
            {
                print("Failed to set up a device with error: \(error)")
            }
        }
        
    }
}

@available(iOS 16.1, *)
class MatterAddDeviceHandler: MatterAddDeviceExtensionRequestHandler
{
    override func validateDeviceCredential(_ deviceCredential: MatterAddDeviceExtensionRequestHandler.DeviceCredential) async throws
    {
        print("validateDeviceCredential \(deviceCredential)")
    }
    
    override func selectThreadNetwork(from threadScanResults: [MatterAddDeviceExtensionRequestHandler.ThreadScanResult]) async throws -> MatterAddDeviceExtensionRequestHandler.ThreadNetworkAssociation
    {
        print("selectThreadNetwork \(threadScanResults)")
        return ThreadNetworkAssociation.defaultSystemNetwork
    }
    
    override func commissionDevice(in home: MatterAddDeviceRequest.Home?, onboardingPayload: String, commissioningID: UUID) async throws
    {
        print("Home: \(String(describing: home)) " + "payload: \(onboardingPayload) "  + "commissionID: \(commissioningID)")
    }
}

Many thanks for your help.

@bzbarsky-apple
Copy link
Contributor

Generate a setup code? You mean pairing code or a QR code payload?

I mean that you use MatterSupport.framework to generate a QR code payload, yes.

Past that, I'm afraid I can't help you much with MatterSupport, sorry....

@aajain-com
Copy link
Contributor

@robinmo please file a Feedback Assistant request and attach the iOS logs to the ticket.

Feedback assistant ticket:
- File a feedback assistant ticket.
https://developer.apple.com/bug-reporting/#feedback-assistant
- Click on the link below using your account:
https://feedbackassistant.apple.com/new-form-response
- Choose iOS/iPadOS to file an issue
- Choose the area as Home App and fill in the details of the type of issue and the description
* Technical Information
Please provide the following
a) Sysdiagnose logs for iPhone / iPad with the timestamp / timeframe of the issue
b) Sysdiagnose logs for all the Home Hubs (HomePod mini / HomePod / Apple TV) with the timestamp / timeframe of the issue
c) Accessory logs with the timestamp / timeframe of the issue
d) mDNS network logs with timestamp / timeframe of the issue
e) Video or screenshot describing the issue (optional but beneficial)
Please make sure you download and install the profiles for iOS and tvOS as provided here. The instructions are also in these links.
* iOS:
- https://developer.apple.com/bug-reporting/profiles-and-logs/?platform=ios&name=homekit
 - https://developer.apple.com/bug-reporting/profiles-and-logs/?platform=ios&name=network
 - https://developer.apple.com/bug-reporting/profiles-and-logs/?platform=ios&name=mdns
* tvOS:
- https://developer.apple.com/bug-reporting/profiles-and-logs/?platform=tvos&name=homekit
- https://developer.apple.com/bug-reporting/profiles-and-logs/?platform=tvos&name=network
- https://developer.apple.com/bug-reporting/profiles-and-logs/?platform=tvos&name=mdns
For installation instructions, refer to https://developer.apple.com/bug-reporting/profiles-and-logs.
Note: Once you have the profile on the iPhone, it will ask you if you want to install it on other devices. Follow the prompts to install on the HomePod, Apple TV, etc., where you have the described issue and reproduce it.
Apple Developer
Bug Reporting - Apple Developer
Now with Feedback Assistant available on iPhone, iPad, Mac, and the web, it's easier to submit effective bug reports and request enhancements to APIs and tools. (71 kB)
https://developer.apple.com/bug-reporting/#feedback-assistant
developer.apple.com
Profiles and Logs - Bug Reporting - Apple Developer
Get details on providing logs, reproducible test cases, and other information that will help us investigate and diagnose your reported issues.
developer.apple.com
Profiles and Logs - Bug Reporting - Apple Developer
Get details on providing logs, reproducible test cases, and other information that will help us investigate and diagnose your reported issues.
developer.apple.com
Profiles and Logs - Bug Reporting - Apple Developer
Get details on providing logs, reproducible test cases, and other information that will help us investigate and diagnose your reported issues.

@robinmo
Copy link
Contributor Author

robinmo commented Mar 22, 2023

@robinmo I am pretty sure no one has tested Matter.framework on anything before iOS 13.

MatterSupport.framework does not exist before 15.x.

@bzbarsky-apple Hi,I found CHIP can support iOS from iOS11.0, the sample app darwin/CHIPTool use the CoreNFC framework, just need to change its Link Binary With Libraries status to optional

CoreNFC optional

Then run and commission is OK.🎉🎉🎉

@robinmo
Copy link
Contributor Author

robinmo commented Mar 23, 2023

Hi, @aajain-com @bzbarsky-apple

MatterSupport issue has been resolved by adding a matter extension.

However here is another problem:

we just want to make our mesh device hub to be a controller and it do all the distribution of Node IDs and certificates(such as RAC ICAC). But with MatterSupport for now, I haven't found a way to configure these just as the CHIP do.
Do you have any suggestion?

@bzbarsky-apple
Copy link
Contributor

@robinmo What MatterSupport does is bring the device onto the IP network, open a commissioning window, and hand you a setup code you can use to commission the device into your fabric.

After that you use Matter.framework to do the commissioning, and you can do your own certificates/etc via that.

@robinmo
Copy link
Contributor Author

robinmo commented Mar 24, 2023

@robinmo What MatterSupport does is bring the device onto the IP network, open a commissioning window, and hand you a setup code you can use to commission the device into your fabric.

After that you use Matter.framework to do the commissioning, and you can do your own certificates/etc via that.

@bzbarsky-apple So, could you provide OCW command related API in MatterSupport?

Is it in MTRBaseDevice open func openCommissioningWindow(withSetupPasscode setupPasscode: NSNumber, discriminator: NSNumber, duration: NSNumber, queue: DispatchQueue) async throws -> MTRSetupPayload

If no? What's the duration of announcement(As the matter specification says, 5-15min)? And, if expired, how to trigger OCW and get the setup code?

We consider that if first commission into apple ecosystem, then open commission window for another ecosystem, the time cost will be bigger than usual(directly commission into the one we want)? Is it the only way to do this(as for resolve ble profile demanded)? It seems quite strange and different from apple style.

@bzbarsky-apple
Copy link
Contributor

So, could you provide OCW command related API in MatterSupport?

I'm not sure what you're asking for, exactly.

Is it in MTRBaseDevice

The API you quote will open a commissioning window, yes, if you already have an MTRBaseDevice for an operational device. But that does not sound like your situation, if you have not commissioned the device yet.

What's the duration of announcement

The "duration" bit in the selector there.

Is it the only way to do this

It is, yes, for devices that need to be commissioned over BLE. Again: use MatterSupport, which will bring the device onto the IP network, open a commissioning window, and give you an onboarding payload that you can use to commission. Then commission using that onboarding payload.

@robinmo
Copy link
Contributor Author

robinmo commented Mar 24, 2023

@bzbarsky-apple Got it. Many thanks.

@robinmo
Copy link
Contributor Author

robinmo commented Mar 24, 2023

@bzbarsky-apple
I found MTRDevice initialization need params nodeID and controller. And to make a controller need some startup params.
At the first, I suppose to get these info from the MatterAddDeviceExtensionRequestHandler delegate, but found nothing about that.
MTRClusterAdministratorCommissioning has to open commission window(OCW) too, BUT the init?(device: MTRDevice, endpoint: UInt16, queue: DispatchQueue) indicate demand of the MTRDevice instance.
How could I get these info?
How could I construct a MTRDevice to invoke opening commission window?
Or there is another way?

@bzbarsky-apple
Copy link
Contributor

And to make a controller need some startup params.

Yes... The controller represents the fabric you are trying to bring the device onto, so you need to configure it for that fabric.

At the first, I suppose to get these info from the MatterAddDeviceExtensionRequestHandler delegate

How could that possibly work? Again, the controller is supposed to represent your fabric, and you're the only one who knows what the state of that fabric should be.

How could I construct a MTRDevice to invoke opening commission window?

MatterSupport is supposed to open a commissioning window for you. You just need to create a controller representing your fabric, and then commission the device using that controller....

@robinmo
Copy link
Contributor Author

robinmo commented Mar 25, 2023

And to make a controller need some startup params.

Yes... The controller represents the fabric you are trying to bring the device onto, so you need to configure it for that fabric.

At the first, I suppose to get these info from the MatterAddDeviceExtensionRequestHandler delegate

How could that possibly work? Again, the controller is supposed to represent your fabric, and you're the only one who knows what the state of that fabric should be.

How could I construct a MTRDevice to invoke opening commission window?

MatterSupport is supposed to open a commissioning window for you. You just need to create a controller representing your fabric, and then commission the device using that controller....

OMG, I supposed the controller is the one that has already commissioned the device.😅
Got it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants