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

Accessories assign the same instance name for Commissionable Node Service #8931

Closed
doublemis1 opened this issue Aug 12, 2021 · 2 comments · Fixed by #8989
Closed

Accessories assign the same instance name for Commissionable Node Service #8931

doublemis1 opened this issue Aug 12, 2021 · 2 comments · Fixed by #8989
Assignees
Labels

Comments

@doublemis1
Copy link
Contributor

Problem

Each accessory assigns the same instance name for the Commissionable Node service.

Device1:

instance:"000000014A77CBB3-0000000000000002", name:"_matter._tcp", state:Registered, port:5540, priority:0, weight:0
--
instance:"7F785DB45B043129", name:"_matterc._udp,_S0,_L3840,_C1,_V9050", state:Registered, port:5540, priority:0, weight:0
Done

Device2:

instance:"000000014A77CBB3-0000000000000003", name:"_matter._tcp", state:Adding, port:5540, priority:0, weight:0
--
instance:"7F785DB45B043129", name:"_matterc._udp,_S0,_L3840,_C1,_V9050", state:Adding, port:5540, priority:0, weight:0
Done

Full commissioning of the second device failed to resolve the IP address because of failure during sending SRP client services to OTBR.

Proposed Solution

The instance name should be random

@mhazley
Copy link
Contributor

mhazley commented Aug 12, 2021

I think I've been hitting a really similar problem, when I factory reset a thread device and then re-add it, it fails to register with SRP due to being a duplicate record. If I go to the border router and disable and enable the SRP server, it seems to work ok and allow the device to register.

Where is the instance id assigned? I can't seem to find it in the code....

@kkasperczyk-no
Copy link
Contributor

@mhazley it is not exactly the same problem. The problem described in issue is related to the commissionable advertisment records. Instance names of that one should be pseudo-random and for Zephyr entropy source is not initialized properly so the same number is drawn every time.

I believe your problem is related to the operational discovery records and it works as expected (it is known case, but it's not an issue, but proper behavior). What you do by registering operational discovery record is saying to server that device with some node ID, fabric ID, IP address and key is operational. If you do the soft reset of device, the device data and key are still the same, but if you do the factory reset, key is removed. Then you will try to add new record with the same device data, but different key, so from the server perspective it is not allowed, as it spots your device, as completely different device than before (what is partially true, that's how factory reset works). So solution is, as you wrote, reset srp server, or try to configure the device with different node ID than before.

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

Successfully merging a pull request may close this issue.

3 participants